Skip to content

Commit 852d095

Browse files
committed
checkpatch.pl: Update DT vendor prefix check
In commit 8122de5 ("dt-bindings: Convert vendor prefixes to json-schema"), 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. Fixes: 8122de5 ("dt-bindings: Convert vendor prefixes to json-schema") Cc: Joe Perches <[email protected]> Signed-off-by: Rob Herring <[email protected]>
1 parent a5f2246 commit 852d095

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/checkpatch.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3027,7 +3027,7 @@ sub process {
30273027
my @compats = $rawline =~ /\"([a-zA-Z0-9\-\,\.\+_]+)\"/g;
30283028

30293029
my $dt_path = $root . "/Documentation/devicetree/bindings/";
3030-
my $vp_file = $dt_path . "vendor-prefixes.txt";
3030+
my $vp_file = $dt_path . "vendor-prefixes.yaml";
30313031

30323032
foreach my $compat (@compats) {
30333033
my $compat2 = $compat;
@@ -3042,7 +3042,7 @@ sub process {
30423042

30433043
next if $compat !~ /^([a-zA-Z0-9\-]+)\,/;
30443044
my $vendor = $1;
3045-
`grep -Eq "^$vendor\\b" $vp_file`;
3045+
`grep -Eq "\\"\\^\Q$vendor\E,\\.\\*\\":" $vp_file`;
30463046
if ( $? >> 8 ) {
30473047
WARN("UNDOCUMENTED_DT_STRING",
30483048
"DT compatible string vendor \"$vendor\" appears un-documented -- check $vp_file\n" . $herecurr);

0 commit comments

Comments
 (0)