Commit e91b6e263ed6735c766cb14bbe63b9c7bd774526

Authored by Andy Whitcroft
Committed by Linus Torvalds
1 parent 6b4c5bebce

checkpatch: types may sit on a line on their own

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 <dwalker@fifo99.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

scripts/checkpatch.pl
... ... @@ -843,7 +843,7 @@
843 843 $av_preprocessor = 0;
844 844 }
845 845  
846   - } elsif ($cur =~ /^($Type)\s*(?:$Ident|,|\)|\()/) {
  846 + } elsif ($cur =~ /^($Type)\s*(?:$Ident|,|\)|\(|\s*$)/) {
847 847 print "DECLARE($1)\n" if ($dbg_values > 1);
848 848 $type = 'T';
849 849