Re: [PATCH] Documentation: warn users not to use select on choice options in Kconfig

Kees Cook <[email protected]> Wed, 15 Jul 2026 21:19:28 -0700
Newsgroups org.kernel.vger.linux-kbuild,org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel
Message-ID <202607152119.BF8E377B@keescook>
On Wed, Jul 15, 2026 at 11:01:49PM +0100, Julian Braha wrote:
> Hengelein's master thesis about Kconfig from 2015 wrote that 'select'
> does not work on member options inside of a 'choice'.
> 
> So I've re-implemented his check as part of kconfirm:
> https://github.com/julianbraha/kconfirm
> 
> and discovered several instances of these dead selects in use, and
> fixing them is not always trivial. For example, see:
> https://lore.kernel.org/all/[email protected]/
> 
> Let's add a warning to the documentation (a place where developers
> are more likely to see it than a master's thesis...)
> 
> Signed-off-by: Julian Braha <[email protected]>

Yeah, it'd be good to add a checkpatch or even build-time check too.

Reviewed-by: Kees Cook <[email protected]>

-- 
Kees Cook