Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
checkpatch: ignore #define TRACE_<foo> macros
Browse files Browse the repository at this point in the history
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>
Git-commit: f95a7e6
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
  • Loading branch information
JoePerches authored and Stepan Moskovchenko committed Oct 10, 2014
1 parent cd1ff97 commit c5b19dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit c5b19dc

Please sign in to comment.