]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
checkpatch: allow for type modifiers on multiple declarations
authorAndy Whitcroft <apw@shadowen.org>
Thu, 24 Jul 2008 04:29:05 +0000 (21:29 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Jul 2008 17:47:26 +0000 (10:47 -0700)
Allow for type modifiers mid declaration on multiple declarations:

struct mxser_mstatus ms, __user *msu = argp;

Reported by Jiri Slaby.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl

index 3961e759a256dbbbeaa30a47e2d2d1ccb1b6cc9d..bcfb8ef00feeb1a518a482412df0ec0c70871668 100755 (executable)
@@ -721,6 +721,10 @@ sub annotate_values {
                        print "DECLARE($1)\n" if ($dbg_values > 1);
                        $type = 'T';
 
+               } elsif ($cur =~ /^($Modifier)\s*/) {
+                       print "MODIFIER($1)\n" if ($dbg_values > 1);
+                       $type = 'T';
+
                } elsif ($cur =~ /^(\#\s*define\s*$Ident)(\(?)/o) {
                        print "DEFINE($1,$2)\n" if ($dbg_values > 1);
                        $av_preprocessor = 1;