From: Andy Whitcroft Date: Fri, 27 Feb 2009 22:03:08 +0000 (-0800) Subject: checkpatch: a modifier is not an identifier at the end of a type X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=667026e7b082ad59eb7194d6b5d159ed6c340e05;p=linux-beck.git 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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 { # 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); } }