Commit 852d095d authored by Rob Herring's avatar Rob Herring

checkpatch.pl: Update DT vendor prefix check

In commit 8122de54 ("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: 8122de54 ("dt-bindings: Convert vendor prefixes to json-schema")
Cc: Joe Perches <joe@perches.com>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent a5f2246f
...@@ -3027,7 +3027,7 @@ sub process { ...@@ -3027,7 +3027,7 @@ sub process {
my @compats = $rawline =~ /\"([a-zA-Z0-9\-\,\.\+_]+)\"/g; my @compats = $rawline =~ /\"([a-zA-Z0-9\-\,\.\+_]+)\"/g;
my $dt_path = $root . "/Documentation/devicetree/bindings/"; my $dt_path = $root . "/Documentation/devicetree/bindings/";
my $vp_file = $dt_path . "vendor-prefixes.txt"; my $vp_file = $dt_path . "vendor-prefixes.yaml";
foreach my $compat (@compats) { foreach my $compat (@compats) {
my $compat2 = $compat; my $compat2 = $compat;
...@@ -3042,7 +3042,7 @@ sub process { ...@@ -3042,7 +3042,7 @@ sub process {
next if $compat !~ /^([a-zA-Z0-9\-]+)\,/; next if $compat !~ /^([a-zA-Z0-9\-]+)\,/;
my $vendor = $1; my $vendor = $1;
`grep -Eq "^$vendor\\b" $vp_file`; `grep -Eq "\\"\\^\Q$vendor\E,\\.\\*\\":" $vp_file`;
if ( $? >> 8 ) { if ( $? >> 8 ) {
WARN("UNDOCUMENTED_DT_STRING", WARN("UNDOCUMENTED_DT_STRING",
"DT compatible string vendor \"$vendor\" appears un-documented -- check $vp_file\n" . $herecurr); "DT compatible string vendor \"$vendor\" appears un-documented -- check $vp_file\n" . $herecurr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment