checkpatch.pl: Warn if the flattree API is used
authorSimon Glass <sjg@chromium.org>
Fri, 22 May 2020 22:32:38 +0000 (16:32 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 4 Jun 2020 22:10:02 +0000 (18:10 -0400)
We want people to use the livetree API, so request it.

Signed-off-by: Simon Glass <sjg@chromium.org>
scripts/checkpatch.pl

index 1053d29ce94e225c5236ad17acd0dea53c546209..2654f9e5f75aa50eccd50cd9e06308ffb01c6a4a 100755 (executable)
@@ -2249,6 +2249,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 {