Re: [PATCH] x86/cpu: cleanup duplicate dependencies in Kconfig
From: Ingo Molnar
Date: Sun May 31 2026 - 03:05:13 EST
* Julian Braha <julianbraha@xxxxxxxxx> wrote:
> The Kconfig in the choice menu already has an 'if X86'
> affecting all of the config options within the choice, meaning that each
> of the individual 'depends on' statements in this file is a duplicate
> dependency (dead code).
>
> Let's leave the initial 'depends on X86_32' in the choice menu,
> and remove the individual dependencies from each option.
>
> This dead code was found by kconfirm, a static analysis tool for Kconfig.
>
> Signed-off-by: Julian Braha <julianbraha@xxxxxxxxx>
> ---
> arch/x86/Kconfig.cpu | 16 ----------------
> 1 file changed, 16 deletions(-)
>
> diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
> index 1377edd9a997..36c8007c1559 100644
> --- a/arch/x86/Kconfig.cpu
> +++ b/arch/x86/Kconfig.cpu
> @@ -45,21 +45,18 @@ choice
>
> config M586TSC
> bool "Pentium-Classic"
> - depends on X86_32
> help
> Select this for a Pentium Classic processor with the RDTSC (Read
> Time Stamp Counter) instruction for benchmarking.
>
> config M586MMX
> bool "Pentium-MMX"
> - depends on X86_32
> help
> Select this for a Pentium with the MMX graphics/multimedia
> extended instructions.
Dunno, I don't really like this change, because it obfuscates the
dependency.
Yes, technically the dependency is already expressed shared, but
in practice it's useful to see 'at a glance' whether such a
CPU config option is 32-bit only, 64-bit only or generic.
Thanks,
Ingo