From: Andy Whitcroft Date: Tue, 26 Oct 2010 21:23:11 +0000 (-0700) Subject: checkpatch: types may sit on a line on their own X-Git-Tag: v2.6.37-rc1~105^2~16 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=e91b6e263ed6735c766cb14bbe63b9c7bd774526;p=~emulex%2Finfiniband.git 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 Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 0a87c7417ad..41f59b1e209 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -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';