projects/linux·commit 389a2fe5

checkpatch: allow for type modifiers on multiple declarations

389a2fe5 · Andy Whitcroft <[email protected]> · 2008-07-23 21:29:05 -07:00

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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
389a2fe57ffc59a649bea39db4d7e6d2eff2b562
Parents
3c232147

Changes

1 files changed · +4 −0

FileStatusAddDelContent
scripts/checkpatch.plmodified+4−0View file

scripts/checkpatch.pl

View file
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 3961e75..bcfb8ef 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;