lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3231858.06thYagCLy@kreacher>
Date:   Fri, 05 Mar 2021 19:40:36 +0100
From:   "Rafael J. Wysocki" <rjw@...ysocki.net>
To:     Linux ACPI <linux-acpi@...r.kernel.org>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Linux PM <linux-pm@...r.kernel.org>,
        Zhang Rui <rui.zhang@...el.com>,
        Jonathan Cameron <jic23@...nel.org>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        linux-iio@...r.kernel.org, Jean Delvare <jdelvare@...e.com>,
        Guenter Roeck <linux@...ck-us.net>, linux-hwmon@...r.kernel.org
Subject: [PATCH v1 1/4] ACPI: processor: perflib: Eliminate redundant status check

From: Rafael J. Wysocki <rafael.j.wysocki@...el.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@...el.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,



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ