summaryrefslogtreecommitdiff
path: root/drivers/acpi/processor_perflib.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-03-05 21:41:44 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-03-08 21:10:30 +0300
commit4c324548f09fec413b4ee589174dabacfe17d953 (patch)
tree43db312324b6fccc184402a163c06debbec484a9 /drivers/acpi/processor_perflib.c
parenta030fee8db446aaf928c9c0960a21e319886ffdc (diff)
downloadlinux-4c324548f09fec413b4ee589174dabacfe17d953.tar.xz
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/processor_perflib.c')
-rw-r--r--drivers/acpi/processor_perflib.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index 686b23fb968c..1b6aa635bff6 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -67,9 +67,7 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
acpi_processor_ppc_in_use = true;
if (ACPI_FAILURE(status)) {
- acpi_handle_warn(pr->handle,
- "_PPC evaluation failed: %s\n",
- acpi_format_exception(status));
+ acpi_evaluation_failure_warn(pr->handle, "_PPC", status);
return -ENODEV;
}
}
@@ -199,8 +197,7 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
status = acpi_evaluate_object(pr->handle, "_PCT", NULL, &buffer);
if (ACPI_FAILURE(status)) {
- acpi_handle_warn(pr->handle, "_PCT evaluation failed: %s\n",
- acpi_format_exception(status));
+ acpi_evaluation_failure_warn(pr->handle, "_PCT", status);
return -ENODEV;
}
@@ -300,8 +297,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
status = acpi_evaluate_object(pr->handle, "_PSS", NULL, &buffer);
if (ACPI_FAILURE(status)) {
- acpi_handle_warn(pr->handle, "_PSS evaluation failed: %s\n",
- acpi_format_exception(status));
+ acpi_evaluation_failure_warn(pr->handle, "_PSS", status);
return -ENODEV;
}