* [PATCH] cpufreq: clean up dead dependencies on X86 in Kconfig
@ 2026-04-17 23:06 Julian Braha
2026-04-19 4:09 ` Mario Limonciello
0 siblings, 1 reply; 2+ messages in thread
From: Julian Braha @ 2026-04-17 23:06 UTC (permalink / raw)
To: rafael, viresh.kumar
Cc: gautham.shenoy, superm1, Perry.Yuan, skhan, ray.huang, linux-pm,
linux-kernel, Julian Braha
The Kconfig in the parent directory already has an 'if X86'
condition wrapping the inclusion of this file, meaning that each of the
individual 'depends on' statements in this file is a duplicate dependency
(dead code).
I propose leaving the outer 'if X86...endif' and removing
the individual 'depends on X86' statement from each option.
This dead code was found by kconfirm, a static analysis tool for Kconfig.
Signed-off-by: Julian Braha <julianbraha@gmail.com>
---
drivers/cpufreq/Kconfig.x86 | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/cpufreq/Kconfig.x86 b/drivers/cpufreq/Kconfig.x86
index 027e6ea2e038..9afceb1143df 100644
--- a/drivers/cpufreq/Kconfig.x86
+++ b/drivers/cpufreq/Kconfig.x86
@@ -5,7 +5,6 @@
config X86_INTEL_PSTATE
bool "Intel P state control"
- depends on X86
select ACPI_PROCESSOR if ACPI
select ACPI_CPPC_LIB if X86_64 && ACPI && SCHED_MC_PRIO
select CPU_FREQ_GOV_PERFORMANCE
@@ -36,7 +35,7 @@ config X86_PCC_CPUFREQ
config X86_AMD_PSTATE
bool "AMD Processor P-State driver"
- depends on X86 && ACPI
+ depends on ACPI
select ACPI_PROCESSOR
select ACPI_CPPC_LIB if X86_64
select CPU_FREQ_GOV_SCHEDUTIL if SMP
@@ -84,7 +83,7 @@ config X86_AMD_PSTATE_DYNAMIC_EPP
config X86_AMD_PSTATE_UT
tristate "selftest for AMD Processor P-State driver"
- depends on X86 && ACPI_PROCESSOR
+ depends on ACPI_PROCESSOR
depends on X86_AMD_PSTATE
default n
help
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] cpufreq: clean up dead dependencies on X86 in Kconfig
2026-04-17 23:06 [PATCH] cpufreq: clean up dead dependencies on X86 in Kconfig Julian Braha
@ 2026-04-19 4:09 ` Mario Limonciello
0 siblings, 0 replies; 2+ messages in thread
From: Mario Limonciello @ 2026-04-19 4:09 UTC (permalink / raw)
To: Julian Braha, rafael, viresh.kumar
Cc: gautham.shenoy, Perry.Yuan, skhan, ray.huang, linux-pm,
linux-kernel
On 4/17/26 18:06, Julian Braha wrote:
> The Kconfig in the parent directory already has an 'if X86'
> condition wrapping the inclusion of this file, meaning that each of the
> individual 'depends on' statements in this file is a duplicate dependency
> (dead code).
>
> I propose leaving the outer 'if X86...endif' and removing
> the individual 'depends on X86' statement from each option.
>
> This dead code was found by kconfirm, a static analysis tool for Kconfig.
>
> Signed-off-by: Julian Braha <julianbraha@gmail.com>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
> ---
> drivers/cpufreq/Kconfig.x86 | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/cpufreq/Kconfig.x86 b/drivers/cpufreq/Kconfig.x86
> index 027e6ea2e038..9afceb1143df 100644
> --- a/drivers/cpufreq/Kconfig.x86
> +++ b/drivers/cpufreq/Kconfig.x86
> @@ -5,7 +5,6 @@
>
> config X86_INTEL_PSTATE
> bool "Intel P state control"
> - depends on X86
> select ACPI_PROCESSOR if ACPI
> select ACPI_CPPC_LIB if X86_64 && ACPI && SCHED_MC_PRIO
> select CPU_FREQ_GOV_PERFORMANCE
> @@ -36,7 +35,7 @@ config X86_PCC_CPUFREQ
>
> config X86_AMD_PSTATE
> bool "AMD Processor P-State driver"
> - depends on X86 && ACPI
> + depends on ACPI
> select ACPI_PROCESSOR
> select ACPI_CPPC_LIB if X86_64
> select CPU_FREQ_GOV_SCHEDUTIL if SMP
> @@ -84,7 +83,7 @@ config X86_AMD_PSTATE_DYNAMIC_EPP
>
> config X86_AMD_PSTATE_UT
> tristate "selftest for AMD Processor P-State driver"
> - depends on X86 && ACPI_PROCESSOR
> + depends on ACPI_PROCESSOR
> depends on X86_AMD_PSTATE
> default n
> help
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-19 4:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-17 23:06 [PATCH] cpufreq: clean up dead dependencies on X86 in Kconfig Julian Braha
2026-04-19 4:09 ` Mario Limonciello
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox