Re: [PATCH v4] checkpatch: warn on uppercase N/Y/M as Kconfig tristate literals
From: Andrew Jones
Date: Wed May 27 2026 - 13:36:59 EST
On Wed, May 27, 2026 at 07:47:51AM -0700, Joe Perches wrote:
> On Wed, 2026-05-27 at 09:25 -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.
>
> []
>
> > Link: https://bugzilla.kernel.org/show_bug.cgi?id=216748 [1]
>
> Unless I misread the bug report:
>
> All this for something that happened once and
that we know of
> when it happened was benign?
>
Correct, but 'default M' and 'default Y' would not be benign and they
would potentially lead to some head scratching. I also don't know if
any of those types of instances have ever occurred.
Thanks,
drew