Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756807Ab3G3SRJ (ORCPT ); Tue, 30 Jul 2013 14:17:09 -0400 Received: from perches-mx.perches.com ([206.117.179.246]:57616 "EHLO labridge.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753894Ab3G3SRH (ORCPT ); Tue, 30 Jul 2013 14:17:07 -0400 Message-ID: <1375208226.2075.126.camel@joe-AO722> Subject: [PATCH] checkpatch: Ignore #define TRACE_ macros From: Joe Perches To: Andrew Morton Cc: Sarah Sharp , Li Zefan , Andy Whitcroft , linux-kernel@vger.kernel.org Date: Tue, 30 Jul 2013 11:17:06 -0700 In-Reply-To: <51F73237.1010606@huawei.com> References: <20130729195201.GC14883@xanatos> <51F7171C.4060100@huawei.com> <1375149538.2075.95.camel@joe-AO722> <51F71FBC.6030600@huawei.com> <1375151796.2075.97.camel@joe-AO722> <51F72D55.7050108@huawei.com> <1375153806.2075.100.camel@joe-AO722> <51F73237.1010606@huawei.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.6.4-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1239 Lines: 34 The tracing subsystem uses slightly odd #defines to set path/directory locations for include files. These #defines can cause false positives for the complex macro tests so add exclusions for these specific #defines (TRACE_SYSTEM, TRACE_INCLUDE_FILE, TRACE_INCLUDE_PATH). Signed-off-by: Joe Perches --- scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 2ee9eb7..998ad8f 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3374,7 +3374,8 @@ sub process { $dstat !~ /^for\s*$Constant$/ && # for (...) $dstat !~ /^for\s*$Constant\s+(?:$Ident|-?$Constant)$/ && # for (...) bar() $dstat !~ /^do\s*{/ && # do {... - $dstat !~ /^\({/) # ({... + $dstat !~ /^\({/ && # ({... + $ctx !~ /^.\s*#\s*define\s+TRACE_(?:SYSTEM|INCLUDE_FILE|INCLUDE_PATH)\b/) { $ctx =~ s/\n*$//; my $herectx = $here . "\n"; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/