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

From: Andy Shevchenko

Date: Wed May 13 2026 - 17:44:49 EST


+Cc: Randy: FYI.

On Wed, May 13, 2026 at 04:03:29PM -0500, Andrew Jones wrote:
> Add 'make kconfig-sym-check', a static checker that finds Kconfig
> symbols referenced in expressions (select, depends on, default, etc.)
> but never defined via config/menuconfig anywhere in the tree. New
> dangling symbols are reported as errors (exit 1) unless they are
> listed in an exclusion file, e.g.
>
> KCONFIG_SYM_CHECK_EXCLUDES=sym-check-excludes make kconfig-sym-check
>
> The checker also warns about uppercase N/Y/M used as tristate literal
> values following the same logic as checkpatch.
>
> This new static checker is the script used for [1] with a few
> improvements to avoid some false positives.

Acked-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

--
With Best Regards,
Andy Shevchenko