summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2014-07-23 09:12:03 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2014-07-23 09:12:03 +1000
commitaf38cd909c49d0a52d955a1786f64a5a1f248f2e (patch)
tree0013f62ae229c5d51c9d981999f31467097a47ad /scripts
parent8928ee5024c271de480ee1b1b2cbc4ae8cec1874 (diff)
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>
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