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 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel