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>
This commit is contained in:
Andy Whitcroft 2010-10-26 14:23:11 -07:00 committed by Linus Torvalds
parent 6b4c5bebce
commit e91b6e263e
1 changed files with 1 additions and 1 deletions

View File

@ -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';