Emit a warning that includes return code in a readable format. Example:
ACPI: Failed to initialize tables, status=0x5 (AE_NOT_FOUND)
No other functional changes intended.
Signed-off-by: Bartosz Szczepanek <bsz@amazon.de>
Link: https://patch.msgid.link/20250423085637.38658-1-bsz@amazon.de
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
}
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;
}