checkpatch: pointer type star may have modifiers following

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>
This commit is contained in:
Andy Whitcroft 2009-02-27 14:03:07 -08:00 committed by Linus Torvalds
parent 00ef4ece05
commit a3340b3578

View file

@ -1886,11 +1886,11 @@ sub process {
if ($ctx !~ /[WEBC]x./ && $ca !~ /(?:\)|!|~|\*|-|\&|\||\+\+|\-\-|\{)$/) { if ($ctx !~ /[WEBC]x./ && $ca !~ /(?:\)|!|~|\*|-|\&|\||\+\+|\-\-|\{)$/) {
ERROR("space required before that '$op' $at\n" . $hereptr); 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 # A unary '*' may be const
} elsif ($ctx =~ /.xW/) { } 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. # unary ++ and unary -- are allowed no space on one side.