On 2023/8/13 10:08, Joe Perches wrote: > On Sat, 2023-08-12 at 21:53 -0400, Steven Rostedt wrote: >> On Sat, 12 Aug 2023 18:17:17 -0700 >> Joe Perches <joe@xxxxxxxxxxx> wrote: >> >>>> I forgot to say "for TRACE_EVENT() macros". This is not about what >>>> checkpatch says about other code. >>> >>> trace has its own code style and checkpatch needs another >>> parsing mechanism just for it, including the alignment to >>> open parenthesis test. >> >> If you have a template patch to add the parsing mechanism, I'd be happy >> to try to fill in the style. > > There is no checkpatch mechanism per se. It's all ad-hoc. > > Perhaps something like this though would work well enough > as it just avoids all the other spacing checks and such. > --- > scripts/checkpatch.pl | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 528f619520eb9..3017f4dd09fd2 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -3947,6 +3947,9 @@ sub process { > } > } > > +# trace include files use a completely different grammar > + next if ($realfile =~ m{(?:include/trace/events/|/trace\.h$/)}); > + > # check multi-line statement indentation matches previous line > if ($perl_version_ok && > $prevline =~ /^\+([ \t]*)((?:$c90_Keywords(?:\s+if)\s*)|(?:$Declare\s*)?(?:$Ident|\(\s*\*\s*$Ident\s*\))\s*|(?:\*\s*)*$Lval\s*=\s*$Ident\s*)\(.*(\&\&|\|\||,)\s*$/) { > > > Actually, I'm not sure this is the checkpatch style issue or my code style issue. Seems wired.