From: Ingo Molnar <mingo@kernel.org>
To: Julian Braha <julianbraha@gmail.com>
Cc: tglx@kernel.org, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/cpu: cleanup duplicate dependencies in Kconfig
Date: Sun, 31 May 2026 09:05:00 +0200 [thread overview]
Message-ID: <ahvdnEFffkxyILPJ@gmail.com> (raw)
In-Reply-To: <20260531065743.1408481-1-julianbraha@gmail.com>
* Julian Braha <julianbraha@gmail.com> 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@gmail.com>
> ---
> 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
next prev parent reply other threads:[~2026-05-31 7:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-31 6:57 [PATCH] x86/cpu: cleanup duplicate dependencies in Kconfig Julian Braha
2026-05-31 7:05 ` Ingo Molnar [this message]
2026-06-02 4:33 ` Julian Braha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ahvdnEFffkxyILPJ@gmail.com \
--to=mingo@kernel.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=julianbraha@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.