All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Joe Perches <joe@perches.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	devel <devel@driverdev.osuosl.org>,
	Andy Whitcroft <apw@shadowen.org>
Subject: Re: Tuxradar patching article and [PATCH] scripts/cvt_kernel_style.pl
Date: Tue, 9 Mar 2010 16:16:38 -0800	[thread overview]
Message-ID: <20100310001638.GA10960@suse.de> (raw)
In-Reply-To: <1268179619.1545.95.camel@Joe-Laptop.home>

On Tue, Mar 09, 2010 at 04:06:59PM -0800, Joe Perches wrote:
> On Tue, 2010-03-09 at 15:41 -0800, Greg KH wrote:
> > On Tue, Mar 09, 2010 at 03:32:06PM -0800, Joe Perches wrote:
> > > There was an article published recently:
> > > http://www.tuxradar.com/content/newbies-guide-hacking-linux-kernel
> > > that seems to have prompted several new contributors (welcome)
> > > to create style reformatting patches.
> > > 
> > > The article recommends running checkpatch and fixing the various
> > > non-conforming style elements the output produces.
> > > 
> > > A better solution might be to enhance checkpatch to rewrite the
> > > patch or a file with -f, but that's more than I'd like to do.
> > 
> > I _really_ dislike automatic source conversions by a tool and do not
> > recommend doing that at all.
> 
> Don't be silly.
> 
> You take automatic conversions from tools like coccinelle all
> the time.

Those are sane, as they are tiny and obvious :)

It's the huge "reformat the whole file with indent" type stuff that I
object to.

> What I found poorly written about the article was
> unfortunately you apparently recommend things like:
> 
>         if (error != -ENODEV) {
>                 foo();
>                 bar();
>         } else {
>         	report_error();
>         	goto exit;
>         }
>         
> instead of:
> 
>         if (error == -ENODEV) {
>         	report_error();
>         	goto exit;
>         }
>         foo();
>         bar();

Hey, a job as a copyeditor awaits :)

> and the brace removal example was unfortunate because
> it used printk without KERN_<level> without explanation.
> 
> I think there wasn't enough emphasis on compiling the new
> patched file with something like a .o or .lst comparison
> to the unmodified source to make sure it was OK to send
> to the list.

One can only do so much in a few thousand words.  I'm sorry you disliked
the article, I know the magazine is always looking for new authors.

thanks,

greg k-h

  reply	other threads:[~2010-03-10  0:18 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 [this message]
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
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=20100310001638.GA10960@suse.de \
    --to=gregkh@suse.de \
    --cc=apw@shadowen.org \
    --cc=devel@driverdev.osuosl.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.