cpufreq: cleanup dead code in Kconfig
PATCH 1/1 cpufreq: cleanup dead code in Kconfig
There is already an 'if CPU_FREQ' condition wrapping these config options, making the 'depends on' statement for each a duplicate dependency (dead code).
I propose leaving the outer 'if CPU_FREQ...endif' and removing the individual 'depends on' statement from each option.
This dead code was found by kconfirm, a static analysis tool for Kconfig.
--- drivers/cpufreq/Kconfig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/cpufreq/Kconfig +2 -3
@@ -163,7 +163,6 @@ config CPU_FREQ_GOV_ONDEMAND config CPU_FREQ_GOV_CONSERVATIVE tristate "'conservative' cpufreq governor" - depends on CPU_FREQ select CPU_FREQ_GOV_COMMON help 'conservative' - this driver is rather similar to the 'ondemand'
@@ -188,7 +187,7 @@ config CPU_FREQ_GOV_CONSERVATIVE config CPU_FREQ_GOV_SCHEDUTIL bool "'schedutil' cpufreq policy governor" - depends on CPU_FREQ && SMP + depends on SMP select CPU_FREQ_GOV_ATTR_SET select IRQ_WORK help
@@ -365,6 +364,6 @@ config ACPI_CPPC_CPUFREQ_FIE If in doubt, say N. -endif +endif # CPU_FREQ endmenu
Signature · 1 line
2.51.2
Quoted 36 lines · Julian Braha
There is already an 'if
CPU_FREQ' condition wrapping these config options, making the 'depends on' statement for each a duplicate dependency (dead code).I propose leaving the outer 'if CPU_FREQ...endif' and removing the individual 'depends on' statement from each option.
This dead code was found by kconfirm, a static analysis tool for
Kconfig.Signed-off-by Julian Braha <[email protected]>--- drivers/cpufreq/Kconfig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/cpufreq/Kconfig +1
-2@@ -163,7 +163,6 @@ config CPU_FREQ_GOV_ONDEMAND config CPU_FREQ_GOV_CONSERVATIVE tristate "'conservative' cpufreq governor" - depends on CPU_FREQ select CPU_FREQ_GOV_COMMON help 'conservative' - this driver is rather similar to the 'ondemand'@@ -188,7 +187,7 @@ config CPU_FREQ_GOV_CONSERVATIVE config CPU_FREQ_GOV_SCHEDUTIL bool "'schedutil' cpufreq policy governor" - depends on CPU_FREQ && SMP + depends on SMP select CPU_FREQ_GOV_ATTR_SET select IRQ_WORK help
drivers/cpufreq/Kconfig config ACPI_CPPC_CPUFREQ_FIE · line 369
Quoted 7 lines
drivers/cpufreq/Kconfig +1
-1@@ -365,6 +364,6 @@ config ACPI_CPPC_CPUFREQ_FIE If in doubt, say N. -endif +endif # CPU_FREQ endmenu
Signature · 1 line
viresh
Quoted 39 lines · Viresh Kumar
Quoted 37 lines · Julian Braha
There is already an 'if
CPU_FREQ' condition wrapping these config options, making the 'depends on' statement for each a duplicate dependency (dead code).I propose leaving the outer 'if CPU_FREQ...endif' and removing the individual 'depends on' statement from each option.
This dead code was found by kconfirm, a static analysis tool for
Kconfig.Signed-off-by Julian Braha <[email protected]>--- drivers/cpufreq/Kconfig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/cpufreq/Kconfig +1
-2@@ -163,7 +163,6 @@ config CPU_FREQ_GOV_ONDEMAND config CPU_FREQ_GOV_CONSERVATIVE tristate "'conservative' cpufreq governor" - depends on CPU_FREQ select CPU_FREQ_GOV_COMMON help 'conservative' - this driver is rather similar to the 'ondemand'@@ -188,7 +187,7 @@ config CPU_FREQ_GOV_CONSERVATIVE config CPU_FREQ_GOV_SCHEDUTIL bool "'schedutil' cpufreq policy governor" - depends on CPU_FREQ && SMP + depends on SMP select CPU_FREQ_GOV_ATTR_SET select IRQ_WORK help@@ -365,6 +364,6 @@ config ACPI_CPPC_CPUFREQ_FIE
Quoted 8 lines
drivers/cpufreq/Kconfig config ACPI_CPPC_CPUFREQ_FIE · line 369
Quoted 6 lines
drivers/cpufreq/Kconfig +1
-1If in doubt, say N. -endif +endif # CPU_FREQ endmenuAcked-by Viresh Kumar <[email protected]>
Applied as 7.1 material, thanks!