diff options
author | Rob Herring <robh@kernel.org> | 2019-05-22 10:55:34 -0400 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2019-05-22 15:54:49 -0400 |
commit | 852d095d16a6298834839f441593f59d58a31978 (patch) | |
tree | 5b02a96e0c84860efd2968e6f17ba273e8ee7443 /scripts | |
parent | a5f2246fb9137dfa714dc9d7f593b3f3db5c9b80 (diff) |
checkpatch.pl: Update DT vendor prefix check
In commit 8122de54602e ("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: 8122de54602e ("dt-bindings: Convert vendor prefixes to json-schema")
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/checkpatch.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index bb28b178d929..342c7c781ba5 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -3027,7 +3027,7 @@ sub process { | |||
3027 | my @compats = $rawline =~ /\"([a-zA-Z0-9\-\,\.\+_]+)\"/g; | 3027 | my @compats = $rawline =~ /\"([a-zA-Z0-9\-\,\.\+_]+)\"/g; |
3028 | 3028 | ||
3029 | my $dt_path = $root . "/Documentation/devicetree/bindings/"; | 3029 | 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"; |
3031 | 3031 | ||
3032 | foreach my $compat (@compats) { | 3032 | foreach my $compat (@compats) { |
3033 | my $compat2 = $compat; | 3033 | my $compat2 = $compat; |
@@ -3042,7 +3042,7 @@ sub process { | |||
3042 | 3042 | ||
3043 | next if $compat !~ /^([a-zA-Z0-9\-]+)\,/; | 3043 | next if $compat !~ /^([a-zA-Z0-9\-]+)\,/; |
3044 | my $vendor = $1; | 3044 | my $vendor = $1; |
3045 | `grep -Eq "^$vendor\\b" $vp_file`; | 3045 | `grep -Eq "\\"\\^\Q$vendor\E,\\.\\*\\":" $vp_file`; |
3046 | if ( $? >> 8 ) { | 3046 | if ( $? >> 8 ) { |
3047 | WARN("UNDOCUMENTED_DT_STRING", | 3047 | WARN("UNDOCUMENTED_DT_STRING", |
3048 | "DT compatible string vendor \"$vendor\" appears un-documented -- check $vp_file\n" . $herecurr); | 3048 | "DT compatible string vendor \"$vendor\" appears un-documented -- check $vp_file\n" . $herecurr); |