Re: [PATCH v4] kconfig: add kconfig-sym-check static checker
Sergey Senozhatsky <[email protected]> Wed, 24 Jun 2026 12:34:21 +0900
| Newsgroups | gmane.linux.kbuild.devel,gmane.linux.kernel |
|---|---|
| Message-ID | <[email protected]> |
On (26/06/24 12:27), Sergey Senozhatsky wrote: > % echo "CONFIG_DISABLE_BUGS=y" >> .config > > - Now run make (KCONFIG_WARN_UNKNOWN_SYMBOLS/KCONFIG_WERROR are env > variables) > > % KCONFIG_WARN_UNKNOWN_SYMBOLS=1 KCONFIG_WERROR=1 make oldconfig > > .config:4693:warning: unknown symbol: DISABLE_BUGS > make[2]: *** [scripts/kconfig/Makefile:85: oldconfig] Error 1 > make[1]: *** [/media/dev/linux/Makefile:760: oldconfig] Error 2 > make: *** [Makefile:248: __sub-make] Error 2 > > And make fails. > > kconfig reads the symbols for (pretty much?) all the targets, it > needs to make sure that nothing is missing (SAT), that there are > no conflicts and so on. Detecting unrecognized .config symbols > on the kconfig level is a low hanging fruit, in this regard. OK, maybe they are not similar, as Julian pointed out. Makes we wonder is there any benefit in moving this functionality into kconfig (which is the tool that deals with Kconfig files).