* [PATCH] ACPI: APEI: EINJ: Fix probe error message
@ 2025-05-01 12:46 Jon Hunter
2025-05-01 12:53 ` Sudeep Holla
0 siblings, 1 reply; 3+ messages in thread
From: Jon Hunter @ 2025-05-01 12:46 UTC (permalink / raw)
To: Rafael J . Wysocki, Sudeep Holla
Cc: linux-acpi, linux-kernel, linux-tegra, Jon Hunter
Commit 6cb9441bfe8d ("ACPI: APEI: EINJ: Transition to the faux device
interface") updated the APEI error injection driver to use the faux
device interface and now for devices that don't support ACPI, the
following error message is seen on boot:
ERR KERN faux acpi-einj: probe did not succeed, tearing down the device
The APEI error injection driver returns -ENODEV in the probe function
if ACPI is not supported and so after transitioning the driver to the
faux device interface, the error returned from the probe now causes the
above error message to be displayed.
Fix this by moving the code that detects if ACPI is supported to the
einj_init() function to fix the false error message displayed for
devices that don't support ACPI.
Fixes: 6cb9441bfe8d ("ACPI: APEI: EINJ: Transition to the faux device interface")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
drivers/acpi/apei/einj-core.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/acpi/apei/einj-core.c b/drivers/acpi/apei/einj-core.c
index 7ff334422899..ea4fef3a9bb5 100644
--- a/drivers/acpi/apei/einj-core.c
+++ b/drivers/acpi/apei/einj-core.c
@@ -755,11 +755,6 @@ static int __init einj_probe(struct faux_device *fdev)
acpi_status status;
struct apei_exec_context ctx;
- if (acpi_disabled) {
- pr_debug("ACPI disabled.\n");
- return -ENODEV;
- }
-
status = acpi_get_table(ACPI_SIG_EINJ, 0,
(struct acpi_table_header **)&einj_tab);
if (status == AE_NOT_FOUND) {
@@ -886,6 +881,11 @@ static struct faux_device_ops einj_device_ops __refdata = {
static int __init einj_init(void)
{
+ if (acpi_disabled) {
+ pr_debug("ACPI disabled.\n");
+ return -ENODEV;
+ }
+
einj_dev = faux_device_create("acpi-einj", NULL, &einj_device_ops);
if (!einj_dev)
return -ENODEV;
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] ACPI: APEI: EINJ: Fix probe error message
2025-05-01 12:46 [PATCH] ACPI: APEI: EINJ: Fix probe error message Jon Hunter
@ 2025-05-01 12:53 ` Sudeep Holla
2025-05-07 13:24 ` Rafael J. Wysocki
0 siblings, 1 reply; 3+ messages in thread
From: Sudeep Holla @ 2025-05-01 12:53 UTC (permalink / raw)
To: Jon Hunter; +Cc: Rafael J . Wysocki, linux-acpi, linux-kernel, linux-tegra
On Thu, May 01, 2025 at 01:46:21PM +0100, Jon Hunter wrote:
> Commit 6cb9441bfe8d ("ACPI: APEI: EINJ: Transition to the faux device
> interface") updated the APEI error injection driver to use the faux
> device interface and now for devices that don't support ACPI, the
> following error message is seen on boot:
>
> ERR KERN faux acpi-einj: probe did not succeed, tearing down the device
>
> The APEI error injection driver returns -ENODEV in the probe function
> if ACPI is not supported and so after transitioning the driver to the
> faux device interface, the error returned from the probe now causes the
> above error message to be displayed.
>
> Fix this by moving the code that detects if ACPI is supported to the
> einj_init() function to fix the false error message displayed for
> devices that don't support ACPI.
>
Good catch, it was silently passing error before.
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
--
Regards,
Sudeep
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] ACPI: APEI: EINJ: Fix probe error message
2025-05-01 12:53 ` Sudeep Holla
@ 2025-05-07 13:24 ` Rafael J. Wysocki
0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2025-05-07 13:24 UTC (permalink / raw)
To: Sudeep Holla, Jon Hunter; +Cc: linux-acpi, linux-kernel, linux-tegra
On Thu, May 1, 2025 at 2:53 PM Sudeep Holla <sudeep.holla@arm.com> wrote:
>
> On Thu, May 01, 2025 at 01:46:21PM +0100, Jon Hunter wrote:
> > Commit 6cb9441bfe8d ("ACPI: APEI: EINJ: Transition to the faux device
> > interface") updated the APEI error injection driver to use the faux
> > device interface and now for devices that don't support ACPI, the
> > following error message is seen on boot:
> >
> > ERR KERN faux acpi-einj: probe did not succeed, tearing down the device
> >
> > The APEI error injection driver returns -ENODEV in the probe function
> > if ACPI is not supported and so after transitioning the driver to the
> > faux device interface, the error returned from the probe now causes the
> > above error message to be displayed.
> >
> > Fix this by moving the code that detects if ACPI is supported to the
> > einj_init() function to fix the false error message displayed for
> > devices that don't support ACPI.
> >
>
> Good catch, it was silently passing error before.
>
> Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Applied, thanks!
That said, when fixing a bug that is only present in linux-next and
not yet in the mainline, I'd appreciate a note about this, especially
if it carries a Fixes: tag, because I do rebase patches occasionally
and the commit ids may get stale.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-05-07 13:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-01 12:46 [PATCH] ACPI: APEI: EINJ: Fix probe error message Jon Hunter
2025-05-01 12:53 ` Sudeep Holla
2025-05-07 13:24 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®