Re: Tuxradar patching article and [PATCH] scripts/cvt_kernel_style.pl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux