diff options
author | Tom Rini <trini@konsulko.com> | 2020-05-26 14:29:02 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-06-04 15:08:29 -0400 |
commit | 422748f71f9292cdc06108cda98592e2be42f452 (patch) | |
tree | 047f05ad2648c4b88ff5e02187e92a9e7835e8ae | |
parent | 9c0533b25fff8f4a042bdec58998702fa2bbf528 (diff) | |
download | u-boot-WIP/2020-06-04-misc-bugfixes.tar.gz |
checkpatch.pl: Add check for defining CONFIG_CMD_xxx via config filesWIP/2020-06-04-misc-bugfixes
All of our cmds have a Kconfig entry. Making enabling a CMD via the
config file an error to checkpatch.pl.
Signed-off-by: Tom Rini <trini@konsulko.com>
-rwxr-xr-x | scripts/checkpatch.pl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 17d41825c5..edba365651 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2267,6 +2267,12 @@ sub u_boot_line { WARN("PREFER_IF", "Use 'if (IS_ENABLED(CONFIG...))' instead of '#if or #ifdef' where possible\n" . $herecurr); } + + # use defconfig to manage CONFIG_CMD options + if ($line =~ /\+\s*#\s*(define|undef)\s+(CONFIG_CMD\w*)\b/) { + ERROR("DEFINE_CONFIG_CMD", + "All commands are managed by Kconfig\n" . $herecurr); + } } sub process { |