[PATCH 4/6] checkpatch.pl: Warn if the flattree API is used
Simon Glass
sjg at chromium.org
Sat May 23 00:32:38 CEST 2020
We want people to use the livetree API, so request it.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
scripts/checkpatch.pl | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 9dc42520e2d..e3a2a289aea 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2247,6 +2247,12 @@ sub u_boot_line {
WARN("NEW_UCLASS",
"Possible new uclass - make sure to add a sandbox driver, plus a test in test/dm/<name>.c\n" . $herecurr);
}
+
+ # try to get people to use the livetree API
+ if ($line =~ /^\+.*fdtdec_/) {
+ WARN("LIVETREE",
+ "Use the livetree API (dev_read_...)\n" . $herecurr);
+ }
}
sub process {
--
2.27.0.rc0.183.gde8f92d652-goog
More information about the U-Boot
mailing list