Skip to content

Commit

Permalink
checkpatch: a modifier is not an identifier at the end of a type
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Whitcroft authored and torvalds committed Feb 28, 2009
1 parent a3340b3 commit 667026e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 667026e

Please sign in to comment.