Skip to content

Commit

Permalink
checkpatch: types may sit on a line on their own
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Whitcroft authored and Linus Torvalds committed Oct 26, 2010
1 parent 6b4c5be commit e91b6e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down

0 comments on commit e91b6e2

Please sign in to comment.