diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-27 07:15:30 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-27 07:15:30 -0700 |
| commit | a7bdf7fa33127bf08eb0810698bca607a9462df4 (patch) | |
| tree | 2f4be686e49710d10cc4f5ebc2d5f06ae030b9bd /scripts/checkpatch.pl | |
| parent | 7fda953ffed1b94aa68f80c6c3ab312328aedcb3 (diff) | |
| parent | fea7a08acb13524b47711625eebea40a0ede69a0 (diff) | |
Merge v3.6-rc3 into usb-next
This picks up fixes that we need in this branch for testing.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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"); } |
