mlx4: Modify proxy/tunnel QP mechanism so that guests do no calculations
[cascardo/linux.git] / scripts / checkpatch.pl
index 913d6bd..ca05ba2 100755 (executable)
@@ -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");
                                }