diff --git a/[refs] b/[refs] index e0de064c552d..b0f84a171645 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: eb48c071464757414538c68a6033c8f8c15196f8 +refs/heads/master: ac8e97f8a742828daa1d9de37f6e635888f8d71e diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index 913d6bdfdda3..ca05ba217f5f 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/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"); }