lkml.org 
[lkml]   [2009]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/8] checkpatch: pointer type star may have modifiers following
Date
We may have any modifier following a pointer type star.  Handle this:

void * __user * __user foo;

Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
scripts/checkpatch.pl | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 92d1371..15a5904 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.
--
1.6.1.2.419.g0d87e


\
 
 \ /
  Last update: 2009-01-30 16:07    [W:0.042 / U:0.992 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site