Messages in this thread Patch in this message | | | Subject | [PATCH] checkpatch: Ignore #define TRACE_<foo> macros | From | Joe Perches <> | Date | Tue, 30 Jul 2013 11:17:06 -0700 |
| |
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> --- 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";
| |