Re: [PATCH v2] kconfig: add kconfig-sym-check static checker

From: Andrew Jones

Date: Wed May 20 2026 - 09:20:09 EST


On Tue, May 19, 2026 at 05:39:40PM -0700, Randy Dunlap wrote:
>
>
> On 5/19/26 4:59 PM, Julian Braha wrote:
> > On 5/19/26 22:58, Andrew Jones wrote:
> >> The checker also warns about uppercase N/Y/M used as tristate literal
> >> values following the same logic as checkpatch.
> >
> > Hm, I tested this out by manually adding a:
> > ```
> > config KCONFIG_SYM_TEST
> > default Y
> > ```
> >
> > to the end of the root Kconfig file, but the script didn't actually
> > catch it. The hint about casing only appeared with the 'N'.
> >
> > Could this be a bug, or is the Y symbol actually defined somewhere...?
>
> It's defined in a test file:
> ./scripts/kconfig/tests/choice_randomize/Kconfig:19:config Y
>
> Could the script be seeing/using that?

Yup, looks like it. But I still need a v3, because I see I broke things with a
v2 change I made trying to satisfy sashiko. The script now outputs a bunch of
junk along with the dangling symbols...

drew