summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-05-22 16:32:39 -0600
committerTom Rini <trini@konsulko.com>2020-06-04 18:10:02 -0400
commit58978114d93d5010d15c8be792f9e444da5fb250 (patch)
tree046bc0f0de3242d6eeeae0d8ed62871f95b57618 /scripts
parent7fc7d241169d26ec79a86bfcab0e966c778defe7 (diff)
checkpatch.pl: Request a test when a new command is added
This request is made with nearly every new command. Point to some docs on how to do it. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 2654f9e5f7..cf620c8614 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2255,6 +2255,12 @@ sub u_boot_line {
WARN("LIVETREE",
"Use the livetree API (dev_read_...)\n" . $herecurr);
}
+
+ # add tests for new commands
+ if ($line =~ /^\+.*do_($Ident)\(struct cmd_tbl.*/) {
+ WARN("CMD_TEST",
+ "Possible new command - make sure you add a test\n" . $herecurr);
+ }
}
sub process {