RE: [PATCH] ACPI: APEI: EINJ: warn on invalid argument when explicitly indicated by platform

From: Luck, Tony
Date: Fri Mar 17 2023 - 17:25:43 EST


- if (val != EINJ_STATUS_SUCCESS)
+ if (val == EINJ_STATUS_FAIL)
return -EBUSY;
+ else if (val == EINJ_STATUS_INVAL)
+ return -EINVAL;

The ACPI Specification is really vague here. Documented error codes are

0 = Success (Linux #define EINJ_STATUS_SUCCESS)
1 = Unknown failure (Linux #define EINJ_STATUS_FAIL)
2 = Invalid Access (Linux #define EINJ_STATUS_INVAL)

I don't see how reporting -EBUSY for the "Unknown Failure" case is
actually better.

-Tony