linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Joe Perches <joe@perches.com>
Cc: Xiaofei Tan <tanxiaofei@huawei.com>,
	gregkh@linuxfoundation.org, jirislaby@kernel.org,
	linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linuxarm@openeuler.org
Subject: Re: [PATCH 6/9] tty: hvc_console: Fix coding style issues of block comments
Date: Fri, 21 May 2021 10:44:16 +0200	[thread overview]
Message-ID: <YKdy4PlnhalPIRQv@hovoldconsulting.com> (raw)
In-Reply-To: <3173f7f10e0c212c8c828d9ca4450927f757e7d2.camel@perches.com>

On Thu, May 20, 2021 at 08:21:39AM -0700, Joe Perches wrote:
> On Thu, 2021-05-20 at 10:21 +0200, Johan Hovold wrote:
> > On Tue, May 18, 2021 at 12:01:22PM +0800, Xiaofei Tan wrote:
> > > On 2021/5/17 22:15, Johan Hovold wrote:

> > > > How is this an improvement? First, the multi-line comment style is
> > > > 
> > > > 	/*
> > > > 	 * ...
> > > > 	 */
> > > > 
> > > 
> > > Yes, mostly we use this style. I can follow it if new version is needed.
> > 
> > This is the preferred style outside of networking.
> > 
> > > BTW, How about add the '/*' check into checkpatch.pl?
> > 
> > Checkpatch already has too many checks IMO
> 
> I sometimes agree.  What checkpatch messages do you think are excessive?

The "unsigned" -> "unsigned int" one comes to mind (at least when
running with -f).

Most of the questionable ones are probably hidden behind --subjective,
but due to the unfortunate alias of that switch as --strict, people
don't get the message to use their own judgement and instead think
they'll get a gold star for "full compliance".

So my issue isn't so much which checkpatch itself rather than with how
it is being used and promoted, for example, to introduce aspiring
developers to kernel development in staging.

It's a great tool to run on your own patches before submission (as was
originally intended judging by the apt name), but if I could change
something I'd drop the --strict alias for the --subjective checks and
disable that switch for staging.

Perhaps also add a warning or similar when running with -f on in-tree
code outside of staging.
 
> > and I'm a bit surprised that
> > it doesn't check this already. Perhaps it's because you used the -f to
> > run checkpatch on in-kernel code, which you should not.
> 
> Likely not.  If it was run on a suggested patch, checkpatch doesn't emit
> many messages on unmodified patch context lines.  And it shouldn't.

Right, but here it appears to have been run using -f on in-tree code.

You could still check for this when adding new comments, and perhaps it
already does.

> > it's just that you
> > introduce noise in the logs and do pointless changes of context which
> > makes it harder to use tools like git blame and makes backporting harder
> > for no good reason.
> 
> Pretty pointless metric IMO.  Context changes in comments are mostly harmless.

This isn't just about comment changes but the whole array of
white-space shifting and other pendantry. And also reformatted comments
makes it harder to do code forensics.

> IMO: backporting of these sorts non-bug fix changes is done _far_ too often.

I have yet to see AUTOSEL pick up white-space cleanups but there are
certainly a few non-bug-fix patches currently being backported.

Johan

  reply	other threads:[~2021-05-21  8:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-17  6:37 [PATCH 0/9] tty: hvc_console: Fix some coding style issues Xiaofei Tan
2021-05-17  6:37 ` [PATCH 1/9] tty: hvc_console: Fix spaces required around that '=' Xiaofei Tan
2021-05-17  6:37 ` [PATCH 2/9] tty: hvc_console: Fix "foo * bar" should be "foo *bar" Xiaofei Tan
2021-05-17  6:37 ` [PATCH 3/9] tty: hvc_console: Remove trailing whitespace Xiaofei Tan
2021-05-17  6:37 ` [PATCH 4/9] tty: hvc_console: Fix issues of code indent should use tabs Xiaofei Tan
2021-05-17  6:37 ` [PATCH 5/9] tty: hvc_console: Delete spaces prohibited around open parenthesis '(' and ')' Xiaofei Tan
2021-05-17  6:37 ` [PATCH 6/9] tty: hvc_console: Fix coding style issues of block comments Xiaofei Tan
2021-05-17 14:15   ` Johan Hovold
2021-05-18  4:01     ` Xiaofei Tan
2021-05-20  8:21       ` Johan Hovold
2021-05-20 13:21         ` Xiaofei Tan
2021-05-20 13:52           ` Johan Hovold
2021-05-21  2:23             ` Xiaofei Tan
2021-05-20 15:21         ` Joe Perches
2021-05-21  8:44           ` Johan Hovold [this message]
2021-05-17  6:37 ` [PATCH 7/9] tty: hvc_console: Add a blank line after declarations Xiaofei Tan
2021-05-17  6:37 ` [PATCH 8/9] tty: hvc_console: Remove the repeated words 'no' and 'from' Xiaofei Tan
2021-05-17  6:37 ` [PATCH 9/9] tty: hvc_console: Move open brace { on the previous line Xiaofei Tan
2021-05-20 15:11 ` [PATCH 0/9] tty: hvc_console: Fix some coding style issues Greg KH
2021-05-21  2:18   ` Xiaofei Tan

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=YKdy4PlnhalPIRQv@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@openeuler.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=tanxiaofei@huawei.com \
    /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).