aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-10-13 09:28:32 -0700
committerTom Rini <trini@konsulko.com>2023-10-24 16:34:45 -0400
commita8384f8da1d6f9cab9fe941cc42d60f1a4acc4ea (patch)
tree029e37204ed4a23760d24025a75fe45711069a36 /scripts
parent2dd86b9075466550685daea56ba2f28cb7d0b6a1 (diff)
downloadu-boot-a8384f8da1d6f9cab9fe941cc42d60f1a4acc4ea.zip
u-boot-a8384f8da1d6f9cab9fe941cc42d60f1a4acc4ea.tar.gz
u-boot-a8384f8da1d6f9cab9fe941cc42d60f1a4acc4ea.tar.bz2
checkpatch.pl: Make common.h check boarder
At this point in time we should not add common.h to any new files, so make checkpatch.pl complain. Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 488d73a..b8eb57f 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2636,12 +2636,18 @@ sub u_boot_line {
"All CONFIG symbols are managed by Kconfig\n" . $herecurr);
}
- # Don't put common.h and dm.h in header files
- if ($realfile =~ /\.h$/ && $rawline =~ /^\+#include\s*<(common|dm)\.h>*/) {
+ # Don't put dm.h in header files
+ if ($realfile =~ /\.h$/ && $rawline =~ /^\+#include\s*<dm\.h>*/) {
ERROR("BARRED_INCLUDE_IN_HDR",
"Avoid including common.h and dm.h in header files\n" . $herecurr);
}
+ # Don't add common.h to files
+ if ($rawline =~ /^\+#include\s*<common\.h>*/) {
+ ERROR("BARRED_INCLUDE_COMMON_H",
+ "Do not add common.h to files\n" . $herecurr);
+ }
+
# Do not disable fdt / initrd relocation
if ($rawline =~ /^\+.*(fdt|initrd)_high=0xffffffff/) {
ERROR("DISABLE_FDT_OR_INITRD_RELOC",