Re: [PATCH] checkpatch: make the line length warnings match the coding style document

From: Christoph Hellwig
Date: Tue Dec 22 2020 - 08:13:20 EST


On Mon, Dec 21, 2020 at 08:08:20PM -0800, Joe Perches wrote:
> On Thu, 2020-12-10 at 13:27 -0800, Joe Perches wrote:
> > On Thu, 2020-12-10 at 20:09 +0000, Matthew Wilcox wrote:
> > > On Thu, Dec 10, 2020 at 12:05:04PM -0800, Joe Perches wrote:
> > > > Also, given the ever increasing average identifier length, strict
> > > > adherence to 80 columns is sometimes just not possible without silly
> > > > visual gymnastics. The kernel now has quite a lot of 30+ character
> > > > length function names, constants, and structs.
> > >
> > > maybe checkpatch should warn for identifiers that are 30+ characters
> > > long? address the problem at its source ..
> >
> > Hard to know when to warn as patches could just add uses of already
> > existing names and emitting warnings for those would just be annoying.
> >
> > Maybe something that tests long identifier additions of
> > defines/functions/macros/structs but not their uses and maybe only
> > then in patches and not files.
> >
> > Perhaps:
>
> Anyone care that this should be added or not added to checkpatch?

It is pretty useless. What we need is a patch that doesn't make people
uselessly add overly long lines against the intent of the coding style
document. I have submitted a pretty reasonable one, and I'm open to
alternatives, but we need to to stop people submitting code that does
not fit the coding style all the time because checkpatch doesn't
complain.