[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <21694351.EfDdHjke4D@kreacher>
Date: Mon, 05 Dec 2022 20:08:00 +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>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
Subject: [PATCH v1 5/5] ACPI: processor: perflib: Adjust acpi_processor_notify_smm() return value
From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
Avoid returning a confusing error code from acpi_processor_notify_smm()
if it is called for the second time in the case when SMM notification
regarding P-state control is not supported.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
---
drivers/acpi/processor_perflib.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
Index: linux-pm/drivers/acpi/processor_perflib.c
===================================================================
--- linux-pm.orig/drivers/acpi/processor_perflib.c
+++ linux-pm/drivers/acpi/processor_perflib.c
@@ -475,10 +475,12 @@ int acpi_processor_notify_smm(struct mod
result = acpi_processor_pstate_control();
if (result <= 0) {
- if (!result)
+ if (result) {
+ is_done = result;
+ } else {
pr_debug("No SMI port or pstate_control\n");
-
- is_done = -EIO;
+ is_done = 1;
+ }
goto out_put;
}
Powered by blists - more mailing lists