mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 06:00:43 +00:00
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 <trini@konsulko.com>
This commit is contained in:
parent
dd5b0fad8f
commit
f3e2ebede3
1 changed files with 6 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue