Skip to contentSkip to conversation

cpuidle: cleanup dead dependencies on CPU_IDLE in Kconfig

PATCH New Julian Braha 1 participant 1 message Mar 31 CPU idle time management framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpuidle: cleanup dead dependencies on CPU_IDLE in Kconfig

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.

I propose leaving the 'if CPU_IDLE...endif' condition, and removing these individual 'depends on' statements in Kconfig.mips and Kconfig.powerpc

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

---
 drivers/cpuidle/Kconfig         | 2 +-
 drivers/cpuidle/Kconfig.mips    | 2 +-
 drivers/cpuidle/Kconfig.powerpc | 2 --
 3 files changed, 2 insertions(+), 4 deletions(-)
drivers/cpuidle/Kconfig +1 -1
index cac5997dca50..d6d8386d3f02 100644
@@ -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
drivers/cpuidle/Kconfig.mips +1 -1
index c3c011af4a35..88728b2b4ea0 100644
@@ -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
drivers/cpuidle/Kconfig.powerpc +0 -2
index a797a02b7b6f..1931ac8faffb 100644
@@ -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
Signature · 1 line
2.51.2