Skip to content

Commit 4fbf32a

Browse files
Florian Vaussardtorvalds
authored andcommitted
checkpatch: fix spurious vendor compatible warnings
With a compatible string like compatible = "foo"; checkpatch will currently try to find "foo" in vendor-prefixes.txt, which is wrong since the vendor prefix is empty in this specific case. Skip the vendor test if the compatible is not like compatible = "vendor,something"; Signed-off-by: Florian Vaussard <florian.vaussard@epfl.ch> Cc: Joe Perches <joe@perches.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 8f0dbfa commit 4fbf32a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎scripts/checkpatch.pl‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2088,10 +2088,10 @@ sub process {
20882088
"DT compatible string \"$compat\" appears un-documented -- check $dt_path\n" . $herecurr);
20892089
}
20902090

2091-
my $vendor = $compat;
20922091
my $vendor_path = $dt_path . "vendor-prefixes.txt";
20932092
next if (! -f $vendor_path);
2094-
$vendor =~ s/^([a-zA-Z0-9\-]+)\,.*/$1/;
2093+
next if $compat !~ /^([a-zA-Z0-9\-]+)\,/;
2094+
my $vendor = $1;
20952095
`grep -Eq "$vendor" $vendor_path`;
20962096
if ( $? >> 8 ) {
20972097
WARN("UNDOCUMENTED_DT_STRING",

0 commit comments

Comments
 (0)