summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2014-08-06 16:10:37 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-06 18:01:27 -0700
commit048b123fad06f33169caa4afd6d56d58c31517e5 (patch)
tree3612541a4b6611bc599e8941c9e99c562a4abd2a /scripts
parent29ee1b0c67e0dd7dea8dd718e8326076bce5b6fe (diff)
downloadlinux-048b123fad06f33169caa4afd6d56d58c31517e5.tar.bz2
checkpatch.pl: also suggest 'else if' when if follows brace
This might help a kernel hacker think twice before blindly adding a newline. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Acked-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 1ec68083a929..c40ba40cef43 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3621,7 +3621,7 @@ sub process {
# if should not continue a brace
if ($line =~ /}\s*if\b/) {
ERROR("TRAILING_STATEMENTS",
- "trailing statements should be on next line\n" .
+ "trailing statements should be on next line (or did you mean 'else if'?)\n" .
$herecurr);
}
# case and default should not have general statements after them