Skip to content

Commit

Permalink
checkpatch: pointer type star may have modifiers following
Browse files Browse the repository at this point in the history
We may have any modifier following a pointer type star.  Handle this:

	void * __user * __user foo;

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 Linus Torvalds committed Feb 28, 2009
1 parent 00ef4ec commit a3340b3
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 @@ -1886,11 +1886,11 @@ sub process {
if ($ctx !~ /[WEBC]x./ && $ca !~ /(?:\)|!|~|\*|-|\&|\||\+\+|\-\-|\{)$/) {
ERROR("space required before that '$op' $at\n" . $hereptr);
}
if ($op eq '*' && $cc =~/\s*const\b/) {
if ($op eq '*' && $cc =~/\s*$Modifier\b/) {
# A unary '*' may be const

} elsif ($ctx =~ /.xW/) {
ERROR("space prohibited after that '$op' $at\n" . $hereptr);
ERROR("Aspace prohibited after that '$op' $at\n" . $hereptr);
}

# unary ++ and unary -- are allowed no space on one side.
Expand Down

0 comments on commit a3340b3

Please sign in to comment.