checkpatch: ignore #define TRACE_<foo> 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 <joe@perches.com>
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Joe Perches 2013-09-11 14:24:00 -07:00 committed by Linus Torvalds
parent 91bfe4843d
commit f95a7e6a46
1 changed files with 2 additions and 1 deletions

View File

@ -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";