From: Joe Perches Date: Wed, 11 Sep 2013 21:24:00 +0000 (-0700) Subject: checkpatch: ignore #define TRACE_ macros X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f95a7e6a462ed1338bd576ccb557ff86772a0776;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git checkpatch: ignore #define TRACE_ macros 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 Cc: Sarah Sharp Cc: Li Zefan Cc: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 3ba2db637384..db7778a8f414 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3451,7 +3451,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";