Commit f95a7e6a authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds

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: default avatarJoe 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 91bfe484
...@@ -3451,7 +3451,8 @@ sub process { ...@@ -3451,7 +3451,8 @@ sub process {
$dstat !~ /^for\s*$Constant$/ && # for (...) $dstat !~ /^for\s*$Constant$/ && # for (...)
$dstat !~ /^for\s*$Constant\s+(?:$Ident|-?$Constant)$/ && # for (...) bar() $dstat !~ /^for\s*$Constant\s+(?:$Ident|-?$Constant)$/ && # for (...) bar()
$dstat !~ /^do\s*{/ && # do {... $dstat !~ /^do\s*{/ && # do {...
$dstat !~ /^\({/) # ({... $dstat !~ /^\({/ && # ({...
$ctx !~ /^.\s*#\s*define\s+TRACE_(?:SYSTEM|INCLUDE_FILE|INCLUDE_PATH)\b/)
{ {
$ctx =~ s/\n*$//; $ctx =~ s/\n*$//;
my $herectx = $here . "\n"; my $herectx = $here . "\n";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment