From: Joe Perches <joe@perches.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Matthew Wilcox <willy@infradead.org>,
apw@canonical.com, Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org,
linux-doc <linux-doc@vger.kernel.org>,
Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Subject: Re: [PATCH] checkpatch: make the line length warnings match the coding style document
Date: Tue, 22 Dec 2020 08:22:06 -0800 [thread overview]
Message-ID: <983e6452a7f2af14ca7edfa56cd2e2997172a771.camel@perches.com> (raw)
In-Reply-To: <20201222131234.GA29028@lst.de>
On Tue, 2020-12-22 at 14:12 +0100, Christoph Hellwig wrote:
> 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.
Maybe so, if only because I chose a high value for the max id length
to avoid controversy. I would prefer something like 20.
> 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.
Having checkpatch complain about > 80 column lines didn't stop
patches before, likely it wouldn't stop patches now.
Emitting yet more messages for trivial lines > 80 columns is also
against the intent of the commit that changed the line length maximum.
commit bdc48fa11e46f867ea4d75fa59ee87a7f48be144
checkpatch/coding-style: deprecate 80-column warning
The effect of your patch might as well revert the checkpatch portion
of that commit.
I think that's not a great idea for the reason in the commit message.
next prev parent reply other threads:[~2020-12-22 16:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-10 8:22 [PATCH] checkpatch: make the line length warnings match the coding style document Christoph Hellwig
2020-12-10 20:05 ` Joe Perches
2020-12-10 20:09 ` Matthew Wilcox
2020-12-10 21:27 ` Joe Perches
2020-12-22 4:08 ` Joe Perches
2020-12-22 13:12 ` Christoph Hellwig
2020-12-22 16:22 ` Joe Perches [this message]
2020-12-23 8:29 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=983e6452a7f2af14ca7edfa56cd2e2997172a771.camel@perches.com \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=hch@lst.de \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=torvalds@linux-foundation.org \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).