From: Andy Whitcroft Date: Tue, 10 Jan 2012 23:10:06 +0000 (-0800) Subject: checkpatch: complex macro should allow the empty do while loop X-Git-Tag: upstream/snapshot3+hdmi~8381^2~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=72f115f94d500fc72f78c5df8104a98f8b9cc273;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index afc656d..ca6d0fb 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 {...