lkml.org 
[lkml]   [2011]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 07/11] checkpatch: complex macro should allow the empty do while loop
Date
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>
---
scripts/checkpatch.pl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 1ebfd17..4d1069a 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2856,7 +2856,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 {...
--
1.7.5.4


\
 
 \ /
  Last update: 2011-11-28 16:51    [W:1.563 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site