checkpatch: types may sit on a line on their own
authorAndy Whitcroft <[email protected]>
Tue, 26 Oct 2010 21:23:11 +0000 (14:23 -0700)
committerLinus Torvalds <[email protected]>
Tue, 26 Oct 2010 23:52:19 +0000 (16:52 -0700)
When the following form is used we have a type which fully fills a line.
This means that a type may end at the end of line as well as at the
following identifier.

int **
foo;

Reported-by: Daniel Walker <[email protected]>
Signed-off-by: Andy Whitcroft <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
scripts/checkpatch.pl

index 0a87c7417ada5075e106341c2b68957689cea087..41f59b1e209b97ae6c3526ab938eaed550171eac 100755 (executable)
@@ -843,7 +843,7 @@ sub annotate_values {
                                $av_preprocessor = 0;
                        }
 
-               } elsif ($cur =~ /^($Type)\s*(?:$Ident|,|\)|\()/) {
+               } elsif ($cur =~ /^($Type)\s*(?:$Ident|,|\)|\(|\s*$)/) {
                        print "DECLARE($1)\n" if ($dbg_values > 1);
                        $type = 'T';