summaryrefslogtreecommitdiff
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2012-09-17 15:10:58 +0800
committerShawn Guo <shawn.guo@linaro.org>2012-09-17 15:10:58 +0800
commit8f71fb87e288c5f374ea0e0ddac18707b6649f72 (patch)
treedd77032ddcfcfe995436031281eb008a471cfc30 /scripts/checkpatch.pl
parentd9875690d9b89a866022ff49e3fcea892345ad92 (diff)
parentf8135a74df53ba7010a162dddd112b73ee5652e3 (diff)
Merge tag 'imx-dt-3.7' into imx/dt-for-3.7-2
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 913d6bdfdda3..ca05ba217f5f 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3016,7 +3016,8 @@ sub process {
$herectx .= raw_line($linenr, $n) . "\n";
}
- if (($stmts =~ tr/;/;/) == 1) {
+ if (($stmts =~ tr/;/;/) == 1 &&
+ $stmts !~ /^\s*(if|while|for|switch)\b/) {
WARN("SINGLE_STATEMENT_DO_WHILE_MACRO",
"Single statement macros should not use a do {} while (0) loop\n" . "$herectx");
}