summaryrefslogtreecommitdiff
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@canonical.com>2010-10-26 14:23:11 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-26 16:52:19 -0700
commite91b6e263ed6735c766cb14bbe63b9c7bd774526 (patch)
treeaeb8283e01f9ec0fe3250f60ec83da4fe2399e2e /scripts/checkpatch.pl
parent6b4c5bebcebb0a48d29947e9aa749650751a7696 (diff)
downloadlinux-3.10-e91b6e263ed6735c766cb14bbe63b9c7bd774526.tar.gz
linux-3.10-e91b6e263ed6735c766cb14bbe63b9c7bd774526.tar.bz2
linux-3.10-e91b6e263ed6735c766cb14bbe63b9c7bd774526.zip
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>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl2
1 files changed, 1 insertions, 1 deletions
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';