From: Andy Whitcroft Date: Fri, 27 Feb 2009 22:03:07 +0000 (-0800) Subject: checkpatch: pointer type star may have modifiers following X-Git-Tag: firefly_0821_release~15418 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a3340b35787975414d5f6fee83e00640688be2cb;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 92d13710ff52..15a590425129 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -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.