diff options
author | Andy Whitcroft <apw@canonical.com> | 2012-01-11 00:10:06 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-11 01:30:51 +0100 |
commit | 72f115f94d500fc72f78c5df8104a98f8b9cc273 (patch) | |
tree | 3c6b37bebd9b1f1671df4f8d0dcbe0f625b4a6a0 /scripts/checkpatch.pl | |
parent | checkpatch: fix EXPORT_SYMBOL handling following a function (diff) | |
download | linux-72f115f94d500fc72f78c5df8104a98f8b9cc273.tar.xz linux-72f115f94d500fc72f78c5df8104a98f8b9cc273.zip |
checkpatch: complex macro should allow the empty do while loop
It is common to stub out a function as below, this is triggering a complex
macro format incorrectly. Sort this out:
#define cma_early_regions_reserve(reserve) do { } while (0)
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rwxr-xr-x | scripts/checkpatch.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index afc656d00589..ca6d0fb229f2 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2838,7 +2838,7 @@ sub process { $dstat !~ /^(?:$Ident|-?$Constant)$/ && # 10 // foo() $dstat !~ /$exceptions/ && $dstat !~ /^\.$Ident\s*=/ && # .foo = - $dstat !~ /^do\s*$Constant\s*while\s*$Constant;$/ && # do {...} while (...); + $dstat !~ /^do\s*$Constant\s*while\s*$Constant;?$/ && # do {...} while (...); // do {...} while (...) $dstat !~ /^for\s*$Constant$/ && # for (...) $dstat !~ /^for\s*$Constant\s+(?:$Ident|-?$Constant)$/ && # for (...) bar() $dstat !~ /^do\s*{/ && # do {... |