summaryrefslogtreecommitdiff
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-09-05 07:17:31 (GMT)
committerTakashi Iwai <tiwai@suse.de>2012-09-05 07:17:31 (GMT)
commit14e42917216ab0859827c2d8024df45a917301b4 (patch)
treeefbea5d1c54387d62a6fd66a21560232cf312fda /scripts/checkpatch.pl
parent292f2b6254c9dbb98def6d3521b07a837545ead0 (diff)
parent4266274836e81575ee82498d84f4bd08ab7a7378 (diff)
downloadlinux-fsl-qoriq-14e42917216ab0859827c2d8024df45a917301b4.tar.xz
Merge branch 'fixes' of git://git.alsa-project.org/alsa-kernel into for-next
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 913d6bd..ca05ba2 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");
}