[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0i4iPn=_AWWDUA5R87k0zENcPoHVRrS+ka2PD0LHWqhaA@mail.gmail.com>
Date: Fri, 9 May 2025 20:35:28 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Bartosz Szczepanek <bsz@...zon.de>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, Len Brown <lenb@...nel.org>, nh-open-source@...zon.com,
linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers/acpi: Improve logging around acpi_initialize_tables
On Wed, Apr 23, 2025 at 10:56 AM Bartosz Szczepanek <bsz@...zon.de> wrote:
>
> 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@...zon.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;
> }
> --
Applied as 6.16 material, thanks!
Powered by blists - more mailing lists