From: Andy Whitcroft Date: Thu, 24 Jul 2008 04:29:05 +0000 (-0700) Subject: checkpatch: allow for type modifiers on multiple declarations X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=389a2fe57ffc59a649bea39db4d7e6d2eff2b562;p=linux-beck.git checkpatch: allow for type modifiers on multiple declarations 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 3961e759a256..bcfb8ef00fee 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -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;