diff options
| author | Ingo Molnar <mingo@kernel.org> | 2012-08-28 18:05:55 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2012-08-28 18:05:55 +0200 |
| commit | 508dc4f8eece1a70c493afc6511fdf5934fef567 (patch) | |
| tree | b852a6a5bf9977a33a87158985de02d188ba71d7 /scripts/checkpatch.pl | |
| parent | 734e9a26d612f64e1c9cfd92256969b773954ae2 (diff) | |
| parent | e3e45c01ae690e65f2650e5288b9af802e95a136 (diff) | |
Merge branch 'perf/urgent' into perf/core
Pick up the latest fixes because upcoming uprobes changes will rely on it.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'scripts/checkpatch.pl')
| -rwxr-xr-x | scripts/checkpatch.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 913d6bdfdda..ca05ba217f5 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"); } |
