Skip to contentSkip to conversation

+ checkpatch-check-compatible-strings-in-c-and-h-too.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Mar 10, 2014 Checkpatch

lore
Share & tools
lore
#0 lore raw

Subject: + checkpatch-check-compatible-strings-in-c-and-h-too.patch added to -mm tree
To: [email protected],[email protected],[email protected]
From: [email protected]
Date: Mon, 10 Mar 2014 12:09:25 -0700

The patch titled
Subject: checkpatch: check compatible strings in .c and .h too
has been added to the -mm tree. Its filename is
checkpatch-check-compatible-strings-in-c-and-h-too.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/checkpatch-check-compatible-strings-in-c-and-h-too.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/checkpatch-check-compatible-strings-in-c-and-h-too.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 <[email protected]>
Subject: checkpatch: check compatible strings in .c and .h too

Look for ".compatible = "foo" strings not only in .dts files, but in .c and .h too.

---

 scripts/checkpatch.pl |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
scripts/checkpatch.pl renamed from scripts/checkpatch.pl~checkpatch-check-compatible-strings-in-c-and-h-too +4 -2
diff -puN scripts/checkpatch.pl~checkpatch-check-compatible-strings-in-c-and-h-too scripts/checkpatch.pl
@@ -2067,8 +2067,10 @@ sub process {
 		}
 
 # check for DT compatible documentation
-		if (defined $root && $realfile =~ /\.dts/ &&
-		    $rawline =~ /^\+\s*compatible\s*=/) {
+		if (defined $root &&
+			(($realfile =~ /\.dtsi?$/ && $line =~ /^\+\s*compatible\s*=\s*\"/) ||
+			 ($realfile =~ /\.[ch]$/ && $line =~ /^\+.*\.compatible\s*=\s*\"/))) {
+
 			my @compats = $rawline =~ /\"([a-zA-Z0-9\-\,\.\+_]+)\"/g;
 
 			foreach my $compat (@compats) {

_

Patches currently in -mm which might be from [email protected] 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