]> Git Repo - J-linux.git/commitdiff
cpuidle: Change :enter_dead() driver callback return type to void
authorRafael J. Wysocki <[email protected]>
Fri, 15 Nov 2024 21:00:25 +0000 (22:00 +0100)
committerRafael J. Wysocki <[email protected]>
Tue, 19 Nov 2024 20:46:51 +0000 (21:46 +0100)
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 <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Reviewed-by: Gautham R. Shenoy <[email protected]>
Reviewed-by: Mario Limonciello <[email protected]>
Link: https://patch.msgid.link/[email protected]
drivers/acpi/processor_idle.c
include/linux/cpuidle.h

index 831fa4a121598545749a64b518128ab538834a55..ce728cf7e3015c3290128eeccdfb39dfaeab64e5 100644 (file)
@@ -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)
index 3183aeb7f5b4238a2b88349ae4bf8c492475460f..a9ee4fe55dcfcca8200cc69b9651f91ca1b6b696 100644 (file)
@@ -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
This page took 0.062041 seconds and 4 git commands to generate.