From: Bartosz Szczepanek <bsz@amazon.de>
To: "Rafael J. Wysocki" <rafael@kernel.org>, Len Brown <lenb@kernel.org>
Cc: <nh-open-source@amazon.com>, Bartosz Szczepanek <bsz@amazon.de>,
<linux-acpi@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] drivers/acpi: Improve logging around acpi_initialize_tables
Date: Wed, 23 Apr 2025 08:56:36 +0000 [thread overview]
Message-ID: <20250423085637.38658-1-bsz@amazon.de> (raw)
Emit warning that includes return code in a readable format. Example:
ACPI: Failed to initialize tables, status=0x5 (AE_NOT_FOUND)
This commit intends to make no other functional change.
Signed-off-by: Bartosz Szczepanek <bsz@amazon.de>
---
drivers/acpi/tables.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index 2295abbecd14..6a017cc92d4e 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -719,8 +719,12 @@ int __init acpi_locate_initial_tables(void)
}
status = acpi_initialize_tables(initial_tables, ACPI_MAX_TABLES, 0);
- if (ACPI_FAILURE(status))
+ if (ACPI_FAILURE(status)) {
+ const char *msg = acpi_format_exception(status);
+
+ pr_warn("Failed to initialize tables, status=0x%x (%s)", status, msg);
return -EINVAL;
+ }
return 0;
}
--
2.47.1
next reply other threads:[~2025-04-23 8:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 8:56 Bartosz Szczepanek [this message]
2025-05-09 18:35 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250423085637.38658-1-bsz@amazon.de \
--to=bsz@amazon.de \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nh-open-source@amazon.com \
--cc=rafael@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®