]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
cpuidle: clean up dead dependencies on CPU_IDLE in Kconfig
authorJulian Braha <julianbraha@gmail.com>
Tue, 31 Mar 2026 07:49:20 +0000 (08:49 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 1 Apr 2026 14:01:27 +0000 (16:01 +0200)
The Kconfig in the parent directory already has the first 'if CPU_IDLE'
gating the inclusion of this Kconfig, meaning that the 'depends on
CPUIDLE' statements in these config options are effectively dead code.

Leave the 'if CPU_IDLE...endif' condition, and remove the individual
'depends on' statements in Kconfig.mips and Kconfig.powerpc

This dead code was found by kconfirm, a static analysis tool for
Kconfig.

Signed-off-by: Julian Braha <julianbraha@gmail.com>
[ rjw: Subject and changelog edits ]
Link: https://patch.msgid.link/20260331074920.41269-1-julianbraha@gmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpuidle/Kconfig
drivers/cpuidle/Kconfig.mips
drivers/cpuidle/Kconfig.powerpc

index cac5997dca505fe70352c0d4134229aca203a871..d6d8386d3f02b7daca45a67e63aa418024568973 100644 (file)
@@ -81,7 +81,7 @@ config HALTPOLL_CPUIDLE
         before halting in the guest (more efficient than polling in the
         host via halt_poll_ns for some scenarios).
 
-endif
+endif # CPU_IDLE
 
 config ARCH_NEEDS_CPU_IDLE_COUPLED
        def_bool n
index c3c011af4a35fd997c753199383dbf437eab430f..88728b2b4ea0c58e5fc6eb60d2a149e4c59a90cc 100644 (file)
@@ -4,7 +4,7 @@
 #
 config MIPS_CPS_CPUIDLE
        bool "CPU Idle driver for MIPS CPS platforms"
-       depends on CPU_IDLE && MIPS_CPS
+       depends on MIPS_CPS
        depends on SYS_SUPPORTS_MIPS_CPS
        select ARCH_NEEDS_CPU_IDLE_COUPLED if MIPS_MT || CPU_MIPSR6
        select GENERIC_CLOCKEVENTS_BROADCAST if SMP
index a797a02b7b6fe48c1773fe340776f863c59b1601..1931ac8faffbe622ee4640b7f9166b6738fe562c 100644 (file)
@@ -4,7 +4,6 @@
 #
 config PSERIES_CPUIDLE
        bool "Cpuidle driver for pSeries platforms"
-       depends on CPU_IDLE
        depends on PPC_PSERIES
        default y
        help
@@ -13,7 +12,6 @@ config PSERIES_CPUIDLE
 
 config POWERNV_CPUIDLE
        bool "Cpuidle driver for powernv platforms"
-       depends on CPU_IDLE
        depends on PPC_POWERNV
        default y
        help