Re: [Outreachy kernel] [PATCH v2] staging: media: atomisp: pci: Change line break to avoid an open parenthesis at the end of the line

From: Julia Lawall
Date: Fri Apr 16 2021 - 05:04:12 EST




On Fri, 16 Apr 2021, Sakari Ailus wrote:

> On Fri, Apr 16, 2021 at 10:46:54AM +0200, Julia Lawall wrote:
> > > > If you're running into the 80 character limit, then it's fine to use
> > > > two tabs. I think we have been rejecting patches that push align the
> > > > parameters but push past the 80 character limit. Using one tab is
> > > > confusing because it makes the decalarations line up with the code.
> > >
> > > Interesting. Do you have an example of this? I've thought checkpatch.pl
> > > gave a warning if the line ended with an opening parenthesis no matter
> > > what.
> >
> > Checkpatch is a perl script that searches for patterns that often indicate
> > code that is hard to understand. It is not a precise definition of what
> > is allowed in the Linux kernel. Humans have to amke compromises.
>
> Yeah... but I'd think if this is a preferred style then the warning could
> be omitted. It might not be that difficult.

No idea. It involves looking at two successive lines, which may make it
more complicated. Probably the biggest problem would be knowing whether
the line being looked at represents a function header. Maybe that could
be detected by the fact that there is normally no space at the beginning
of the line?

julia