diff options
author | 2009-02-27 14:03:07 -0800 | |
---|---|---|
committer | 2009-02-27 16:26:22 -0800 | |
commit | a3340b35787975414d5f6fee83e00640688be2cb (patch) | |
tree | 48eadd0bde2f008de17ca1b780e428451b042942 | |
parent | checkpatch: correctly handle type spacing in the face of modifiers (diff) | |
download | linux-a3340b35787975414d5f6fee83e00640688be2cb.tar.gz linux-a3340b35787975414d5f6fee83e00640688be2cb.tar.bz2 linux-a3340b35787975414d5f6fee83e00640688be2cb.zip |
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>
-rwxr-xr-x | scripts/checkpatch.pl | 4 |
1 files changed, 2 insertions, 2 deletions
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. |