Re: [PATCH] checkpatch: warn on uppercase N/Y/M as Kconfig tristate literals
From: Andy Shevchenko
Date: Wed May 13 2026 - 17:07:25 EST
On Wed, May 13, 2026 at 03:57:45PM -0500, Andrew Jones wrote:
> Kconfig tristate literals are always lowercase ('n', 'y', 'm') and
> uppercase N/Y/M are not Kconfig reserved words. Since undefined
> symbols evaluate to 'n', writing 'default Y' or 'default M' silently
> produces 'n' instead of 'y'/'m'. 'default N' happens to produce the
> right value but is still invalid syntax.
>
> Add a warning for N/Y/M in Kconfig expressions found by following
> the same preprocessing logic used by the Kconfig parser itself.
>
> This new warning was inspired by work done for [1].
Acked-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
--
With Best Regards,
Andy Shevchenko