]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
checkpatch: a modifier is not an identifier at the end of a type
authorAndy Whitcroft <apw@canonical.com>
Fri, 27 Feb 2009 22:03:08 +0000 (14:03 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 28 Feb 2009 00:26:22 +0000 (16:26 -0800)
We must make sure we do not misrecognise a modifier as an Identifier
when trying to match types.  Prevent us matching this:

void * __ref

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl

index 15a59042512921bb6b9fc755b3a48bb3e55af3d6..b9e9ee1315b7bce82ccac88bc934249e0f198063 100755 (executable)
@@ -1686,8 +1686,8 @@ sub process {
                        # Modifiers should have spaces.
                        $to =~ s/(\b$Modifier$)/$1 /;
 
-                       #print "from<$from> to<$to>\n";
-                       if ($from ne $to) {
+                       #print "from<$from> to<$to> ident<$ident>\n";
+                       if ($from ne $to && $ident !~ /^$Modifier$/) {
                                ERROR("\"foo${from}bar\" should be \"foo${to}bar\"\n" .  $herecurr);
                        }
                }