2014-04-29 12:53:32

by Javi Merino

[permalink] [raw]
Subject: checkpatch: false positives when parsing trace includes

Hi,

checkpatch complains about the spaces before the close parenthesis in
trace events:

ERROR: space prohibited before that close parenthesis ')'
#94: FILE: include/trace/events/thermal.h:14:
+ __field(unsigned int, freq )

However, in that directory, that's actually the norm, not the
exception:

$ git grep '__field(' include/trace/events/ | grep -P '[ \t]+\)' | wc -l
1284
$ git grep '__field(' include/trace/events/ | wc -l
1783
$

More than 70% of the __field() entries *have* spaces before the close
parenthesis. Should checkpatch make an exception for this directory
and not flag it as an error?

Cheers,
Javi