lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100310001638.GA10960@suse.de>
Date:	Tue, 9 Mar 2010 16:16:38 -0800
From:	Greg KH <gregkh@...e.de>
To:	Joe Perches <joe@...ches.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	devel <devel@...verdev.osuosl.org>,
	Andy Whitcroft <apw@...dowen.org>
Subject: Re: Tuxradar patching article and [PATCH]
 scripts/cvt_kernel_style.pl

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ