Subject: + checkpatch-improve-the-compatible-vendor-match.patch added to -mm tree To: florian.vaussard@xxxxxxx,joe@xxxxxxxxxxx,robh@xxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Mon, 10 Mar 2014 12:09:26 -0700 The patch titled Subject: checkpatch: improve the compatible vendor match has been added to the -mm tree. Its filename is checkpatch-improve-the-compatible-vendor-match.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/checkpatch-improve-the-compatible-vendor-match.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/checkpatch-improve-the-compatible-vendor-match.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Florian Vaussard <florian.vaussard@xxxxxxx> Subject: checkpatch: improve the compatible vendor match Improve the vendor name match in vendor-prefix.txt by only matching the exact vendor name at the beginning of lines. Signed-off-by: Florian Vaussard <florian.vaussard@xxxxxxx> Cc: Joe Perches <joe@xxxxxxxxxxx> Acked-by: Rob Herring <robh@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- scripts/checkpatch.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff -puN scripts/checkpatch.pl~checkpatch-improve-the-compatible-vendor-match scripts/checkpatch.pl --- a/scripts/checkpatch.pl~checkpatch-improve-the-compatible-vendor-match +++ a/scripts/checkpatch.pl @@ -2073,9 +2073,11 @@ sub process { my @compats = $rawline =~ /\"([a-zA-Z0-9\-\,\.\+_]+)\"/g; + my $dt_path = $root . "/Documentation/devicetree/bindings/"; + my $vp_file = $dt_path . "vendor-prefixes.txt"; + foreach my $compat (@compats) { my $compat2 = $compat; - my $dt_path = $root . "/Documentation/devicetree/bindings/"; $compat2 =~ s/\,[a-z]*\-/\,<\.\*>\-/; `grep -Erq "$compat|$compat2" $dt_path`; if ( $? >> 8 ) { @@ -2083,14 +2085,12 @@ sub process { "DT compatible string \"$compat\" appears un-documented -- check $dt_path\n" . $herecurr); } - my $vendor_path = $dt_path . "vendor-prefixes.txt"; - next if (! -f $vendor_path); next if $compat !~ /^([a-zA-Z0-9\-]+)\,/; my $vendor = $1; - `grep -Eq "$vendor" $vendor_path`; + `grep -Eq "^$vendor\\b" $vp_file`; if ( $? >> 8 ) { WARN("UNDOCUMENTED_DT_STRING", - "DT compatible string vendor \"$vendor\" appears un-documented -- check $vendor_path\n" . $herecurr); + "DT compatible string vendor \"$vendor\" appears un-documented -- check $vp_file\n" . $herecurr); } } } _ Patches currently in -mm which might be from florian.vaussard@xxxxxxx are checkpatch-check-vendor-compatible-with-dashes.patch checkpatch-fix-spurious-vendor-compatible-warnings.patch checkpatch-check-compatible-strings-in-c-and-h-too.patch checkpatch-improve-the-compatible-vendor-match.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html