public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frans Pop <elendil@planet.nl>
To: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org, gregkh@suse.de,
	devel@driverdev.osuosl.org, apw@shadowen.org
Subject: Re: Tuxradar patching article and [PATCH] scripts/cvt_kernel_style.pl
Date: Wed, 10 Mar 2010 02:22:25 +0100	[thread overview]
Message-ID: <201003100222.27201.elendil@planet.nl> (raw)
In-Reply-To: <1268177526.1545.62.camel@Joe-Laptop.home>

Joe Perches wrote:
> The article recommends running checkpatch and fixing the various
> non-conforming style elements the output produces.

Hmm. I thought that "style cleanup only" patches were generally frowned 
upon? For one because it requires some familiarity with the kernel coding 
style to make sane choices in situations that are debatable and blindly 
following checkpatch is seldom good. And also to avoid needless merge 
issues.
I've seen several patches drift by the last few days where I thought some 
of the changes were definitely not improvements.

> Convert printk(KERN_<level> to pr_<level>(
> Removes unnecessary parenthesis from return
> Add space after if, for and while
> Convert "for (foo;bar;baz)" to "for (foo; bar; baz)"
> Removes multiple semicolons
> Convert leading spaces to tabs

Maybe I missed it, but you should certainly add removal of trailing space.
And possibly remove spaces before the closing ";" after statements.

Maybe the script should print a large warning (unless -q is used?) that all 
changes should be carefully reviewed manually and not combined with 
functional changes, and have a pointer to Documentation/SubmittingPatches?

Cheers,
FJP

P.S.
I wonder what traffic the advice to mail lkml when "I have a line of code 
that's over 80 chars" is going to generate...

  parent reply	other threads:[~2010-03-10  1:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-09 23:32 Tuxradar patching article and [PATCH] scripts/cvt_kernel_style.pl Joe Perches
2010-03-09 23:41 ` Greg KH
2010-03-10  0:06   ` Joe Perches
2010-03-10  0:16     ` Greg KH
2010-03-10  0:34       ` Joe Perches
2010-03-10 18:35     ` Stefan Richter
2010-03-10 18:38       ` Joe Perches
2010-03-10  1:22 ` Frans Pop [this message]
2010-03-10  3:25   ` [PATCH V2] scripts/cvt_kernel_style.pl: partial "kernel style" pretty-printing Joe Perches
2010-03-24 20:01     ` [PATCH] scripts/cvt_kernel_style.pl: kernel style source code reformatter Joe Perches
2010-03-24 22:31       ` Frans Pop
2010-03-10 18:32 ` Tuxradar patching article and [PATCH] scripts/cvt_kernel_style.pl Stefan Richter

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=201003100222.27201.elendil@planet.nl \
    --to=elendil@planet.nl \
    --cc=apw@shadowen.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.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