Skip to contentSkip to conversation

checkpatch: false positives when parsing trace includes

DISCUSSION Javi Merino 1 participant 1 message Apr 29, 2014

lore
Share & tools
lore
#0 lore raw

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