summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAntony Pavlov <antonynpavlov@gmail.com>2020-04-07 00:05:34 +0300
committerSascha Hauer <s.hauer@pengutronix.de>2020-04-14 11:17:33 +0200
commit9ec754380440d8c1ff8c61cafd6583477c6fba28 (patch)
tree08e01e0286e0d4a05d2fed41d87df87bc01c06c6 /scripts
parent2570742ccc2d5b7f2bbfef0733d1d1c093352d16 (diff)
downloadbarebox-9ec754380440d8c1ff8c61cafd6583477c6fba28.tar.gz
barebox-9ec754380440d8c1ff8c61cafd6583477c6fba28.tar.xz
checkpatch.pl: Update DT vendor prefix check
In commit 796af3473b82 ("dts: update to v5.2-rc1") vendor-prefixes.txt has been converted to a DT schema. Update the checkpatch.pl DT check to extract vendor prefixes from the new vendor-prefixes.yaml file. Based on this linux kernel commit 852d095d16a6 ("checkpatch.pl: Update DT vendor prefix check"). Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 65c2cfad45..b8bd4e1a59 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3010,7 +3010,7 @@ sub process {
# linux device tree files
my $dt_path = $root . "/dts/Bindings/";
- my $vp_file = $dt_path . "vendor-prefixes.txt";
++ my $vp_file = $dt_path . "vendor-prefixes.yaml";
# barebox-specific bindings
$dt_path = $dt_path . " " . $root . "/Documentation/devicetree/bindings/";
@@ -3028,7 +3028,7 @@ sub process {
next if $compat !~ /^([a-zA-Z0-9\-]+)\,/;
my $vendor = $1;
- `grep -Eq "^$vendor\\b" $vp_file`;
++ `grep -Eq "\\"\\^\Q$vendor\E,\\.\\*\\":" $vp_file`;
if ( $? >> 8 ) {
WARN("UNDOCUMENTED_DT_STRING",
"DT compatible string vendor \"$vendor\" appears un-documented -- check $vp_file\n" . $herecurr);