From: Tom Rini Date: Tue, 26 May 2020 18:29:02 +0000 (-0400) Subject: checkpatch.pl: Add check for defining CONFIG_CMD_xxx via config files X-Git-Tag: v2020.07-rc4~6^2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f3e2ebede3019740ee90471acc0a29a684b59221;p=oweals%2Fu-boot.git checkpatch.pl: Add check for defining CONFIG_CMD_xxx via config files 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 --- 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 {