On 2/26/26 16:14, Quentin Schulz wrote:
Hi Heinrich,
On 2/25/26 2:10 PM, Heinrich Schuchardt wrote:
Add checkkconfigsymbols.py from Linux 7.0-rc1 (unchanged since v6.2).
This tool allows to identify the usage of symbols that are not defined
in Kconfig.
I'm wondering if a good next step wouldn't be to require users to run it
as well as checkpatch before submitting patches?
We can take our time to fix the current codebase but making sure none
gets introduced is necessary otherwise we'll be chasing a clean codebase
forever. And I think this could also catch sneaky merge order issues,
e.g. someone adds support for a new board before/while the symbol is
removed/renamed.
We should be able to enforce both checkpatch and checkkconfigsymbols.py
to be run with b4 prep --check (and b4 am/shazam --check), see https://
b4.docs.kernel.org/en/latest/config.html#term-b4.prep-perpatch-check-cmd
and https://b4.docs.kernel.org/en/latest/config.html#term-b4.am-
perpatch-check-cmd
However, I don't think this script is ready to be used with b4. As far
as I understood it, b4 sends the patch to the tool's stdin, so we'd need
to add support for such a thing.
Suggested-by: Ilias Apalodimas <[email protected]>
Signed-off-by: Heinrich Schuchardt <[email protected]>
Imported the script from v7.0-rc1, same as the one in this patch, thus:
Reviewed-by: Quentin Schulz <[email protected]>
Thanks!
Quentin
In the current state the script is helpful to find problems. But it
shows far too many false positives to be added to CI or to used in git
automation.
Best regards
Heinrich