From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754684Ab1K1Ps6 (ORCPT ); Mon, 28 Nov 2011 10:48:58 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:54193 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752901Ab1K1Pm7 (ORCPT ); Mon, 28 Nov 2011 10:42:59 -0500 From: Andy Whitcroft To: Andrew Morton Cc: Joe Perches , linux-kernel@vger.kernel.org, Andy Whitcroft Subject: [PATCH 07/11] checkpatch: complex macro should allow the empty do while loop Date: Mon, 28 Nov 2011 15:42:49 +0000 Message-Id: <1322494973-29225-8-git-send-email-apw@canonical.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1322494973-29225-1-git-send-email-apw@canonical.com> References: <1322494973-29225-1-git-send-email-apw@canonical.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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