aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 696196e194f5..5ea55e330c24 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2108,6 +2108,11 @@ sub process {
2108 ERROR("trailing statements should be on next line\n" . $herecurr); 2108 ERROR("trailing statements should be on next line\n" . $herecurr);
2109 } 2109 }
2110 } 2110 }
2111# if should not continue a brace
2112 if ($line =~ /}\s*if\b/) {
2113 ERROR("trailing statements should be on next line\n" .
2114 $herecurr);
2115 }
2111# case and default should not have general statements after them 2116# case and default should not have general statements after them
2112 if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g && 2117 if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g &&
2113 $line !~ /\G(?: 2118 $line !~ /\G(?: