aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@canonical.com>2009-02-27 17:03:08 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-02-27 19:26:22 -0500
commit667026e7b082ad59eb7194d6b5d159ed6c340e05 (patch)
tree3d3cab494ac822aee47d65847a09ed2ac8fa6332 /scripts/checkpatch.pl
parenta3340b35787975414d5f6fee83e00640688be2cb (diff)
checkpatch: a modifier is not an identifier at the end of a type
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>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 15a590425129..b9e9ee1315b7 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1686,8 +1686,8 @@ sub process {
1686 # Modifiers should have spaces. 1686 # Modifiers should have spaces.
1687 $to =~ s/(\b$Modifier$)/$1 /; 1687 $to =~ s/(\b$Modifier$)/$1 /;
1688 1688
1689 #print "from<$from> to<$to>\n"; 1689 #print "from<$from> to<$to> ident<$ident>\n";
1690 if ($from ne $to) { 1690 if ($from ne $to && $ident !~ /^$Modifier$/) {
1691 ERROR("\"foo${from}bar\" should be \"foo${to}bar\"\n" . $herecurr); 1691 ERROR("\"foo${from}bar\" should be \"foo${to}bar\"\n" . $herecurr);
1692 } 1692 }
1693 } 1693 }