[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241125132029.7241-3-patryk.wlazlyn@linux.intel.com>
Date: Mon, 25 Nov 2024 14:20:22 +0100
From: Patryk Wlazlyn <patryk.wlazlyn@...ux.intel.com>
To: x86@...nel.org
Cc: linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org,
rafael.j.wysocki@...el.com,
len.brown@...el.com,
artem.bityutskiy@...ux.intel.com,
dave.hansen@...ux.intel.com,
patryk.wlazlyn@...ux.intel.com,
peterz@...radead.org,
tglx@...utronix.de,
gautham.shenoy@....com
Subject: [RFC PATCH v4 2/8] cpuidle: Change :enter_dead() driver callback return type to void
From: "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>
After a previous change, cpuidle_play_dead(), which is the only caller
of idle state :enter_dead() callbacks, ignores their return values, so
they may as well be void.
Suggested-by: Peter Zijlstra <peterz@...radead.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
Reviewed-by: Gautham R. Shenoy <gautham.shenoy@....com>
Reviewed-by: Mario Limonciello <mario.limonciello@....com>
---
drivers/acpi/processor_idle.c | 7 ++-----
include/linux/cpuidle.h | 2 +-
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 831fa4a12159..ce728cf7e301 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -578,7 +578,7 @@ static void __cpuidle acpi_idle_do_entry(struct acpi_processor_cx *cx)
* @dev: the target CPU
* @index: the index of suggested state
*/
-static int acpi_idle_play_dead(struct cpuidle_device *dev, int index)
+static void acpi_idle_play_dead(struct cpuidle_device *dev, int index)
{
struct acpi_processor_cx *cx = per_cpu(acpi_cstate[index], dev->cpu);
@@ -591,11 +591,8 @@ static int acpi_idle_play_dead(struct cpuidle_device *dev, int index)
else if (cx->entry_method == ACPI_CSTATE_SYSTEMIO) {
io_idle(cx->address);
} else
- return -ENODEV;
+ return;
}
-
- /* Never reached */
- return 0;
}
static __always_inline bool acpi_idle_fallback_to_c1(struct acpi_processor *pr)
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index 3183aeb7f5b4..a9ee4fe55dcf 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -61,7 +61,7 @@ struct cpuidle_state {
struct cpuidle_driver *drv,
int index);
- int (*enter_dead) (struct cpuidle_device *dev, int index);
+ void (*enter_dead) (struct cpuidle_device *dev, int index);
/*
* CPUs execute ->enter_s2idle with the local tick or entire timekeeping
--
2.47.0
Powered by blists - more mailing lists