lkml.org 
[lkml]   [2021]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v1 1/4] ACPI: processor: perflib: Eliminate redundant status check
Date
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

One of the "status != AE_NOT_FOUND" checks in
acpi_processor_get_platform_limit() is redundant,
so rearrange the code to eliminate it.

No functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/acpi/processor_perflib.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)

Index: linux-pm/drivers/acpi/processor_perflib.c
===================================================================
--- linux-pm.orig/drivers/acpi/processor_perflib.c
+++ linux-pm/drivers/acpi/processor_perflib.c
@@ -63,14 +63,15 @@ static int acpi_processor_get_platform_l
* (e.g. 0 = states 0..n; 1 = states 1..n; etc.
*/
status = acpi_evaluate_integer(pr->handle, "_PPC", NULL, &ppc);
-
- if (status != AE_NOT_FOUND)
+ if (status != AE_NOT_FOUND) {
acpi_processor_ppc_in_use = true;

- if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
- acpi_handle_warn(pr->handle, "_PPC evaluation failed: %s\n",
- acpi_format_exception(status));
- return -ENODEV;
+ if (ACPI_FAILURE(status)) {
+ acpi_handle_warn(pr->handle,
+ "_PPC evaluation failed: %s\n",
+ acpi_format_exception(status));
+ return -ENODEV;
+ }
}

pr_debug("CPU %d: _PPC is %d - frequency %s limited\n", pr->id,


\
 
 \ /
  Last update: 2021-03-05 19:46    [W:0.042 / U:0.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site