summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/pci_link.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-03-05 19:41:44 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-03-08 19:10:30 +0100
commit4c324548f09fec413b4ee589174dabacfe17d953 (patch)
tree43db312324b6fccc184402a163c06debbec484a9 /drivers/acpi/pci_link.c
parentMerge branch 'acpi-processor' (diff)
downloadlinux-4c324548f09fec413b4ee589174dabacfe17d953.tar.xz
linux-4c324548f09fec413b4ee589174dabacfe17d953.zip
ACPI: utils: Introduce acpi_evaluation_failure_warn()
Quite a few users of ACPI objects want to log a warning message if the evaluation fails which is a repeating pattern, so introduce a helper function for that purpose and convert some code where it is open-coded to using it. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/pci_link.c')
-rw-r--r--drivers/acpi/pci_link.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index b9b80e26cb5c..cb7b900d9466 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -256,8 +256,7 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link)
status = acpi_walk_resources(handle, METHOD_NAME__CRS,
acpi_pci_link_check_current, &irq);
if (ACPI_FAILURE(status)) {
- acpi_handle_warn(handle, "_CRS evaluation failed: %s\n",
- acpi_format_exception(status));
+ acpi_evaluation_failure_warn(handle, "_CRS", status);
result = -ENODEV;
goto end;
}
@@ -345,8 +344,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
/* check for total failure */
if (ACPI_FAILURE(status)) {
- acpi_handle_warn(handle, "_SRS evaluation failed: %s",
- acpi_format_exception(status));
+ acpi_evaluation_failure_warn(handle, "_SRS", status);
result = -ENODEV;
goto end;
}