Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 389a2fe5 authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Linus Torvalds
Browse files

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: default avatarAndy Whitcroft <apw@shadowen.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 3c232147
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -721,6 +721,10 @@ sub annotate_values {
			print "DECLARE($1)\n" if ($dbg_values > 1);
			print "DECLARE($1)\n" if ($dbg_values > 1);
			$type = 'T';
			$type = 'T';


		} elsif ($cur =~ /^($Modifier)\s*/) {
			print "MODIFIER($1)\n" if ($dbg_values > 1);
			$type = 'T';

		} elsif ($cur =~ /^(\#\s*define\s*$Ident)(\(?)/o) {
		} elsif ($cur =~ /^(\#\s*define\s*$Ident)(\(?)/o) {
			print "DEFINE($1,$2)\n" if ($dbg_values > 1);
			print "DEFINE($1,$2)\n" if ($dbg_values > 1);
			$av_preprocessor = 1;
			$av_preprocessor = 1;