lkml.org 
[lkml]   [2010]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Tuxradar patching article and [PATCH] scripts/cvt_kernel_style.pl
Date
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...


\
 
 \ /
  Last update: 2010-03-10 02:25    [W:0.094 / U:21.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site