]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
checkpatch: skip fdtdec_* check for tools
authorLars Feyaerts <lars@bitbiz.be>
Mon, 2 Oct 2023 08:00:13 +0000 (10:00 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 11 Oct 2023 14:35:24 +0000 (10:35 -0400)
Have checkpatch.pl skip warnings for use of fdtdec_* functions in
ooling; livetree isn't used there.

Signed-off-by: Lars Feyaerts <lars@bitbiz.be>
Reviewed-by: Simon Glass <sjg@chromium.org>
scripts/checkpatch.pl

index 62b764f6c3835839f0175be7dcae5318c12b01df..488d73a0ed778090293cfbaa84ea7545f87bb4ac 100755 (executable)
@@ -2606,8 +2606,8 @@ sub u_boot_line {
                     "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_/) {
+       # try to get people to use the livetree API, except when changing tooling
+       if ($line =~ /^\+.*fdtdec_/ && $realfile !~ /^tools\//) {
                WARN("LIVETREE",
                     "Use the livetree API (dev_read_...)\n" . $herecurr);
        }