Skip to contentSkip to conversation

Generating patches and using checkpatch.pl

DISCUSSION Daniel Laird 2 participants 2 messages Jun 28, 2007 MIPS

lore
Share & tools
lore
#0 lore raw

I am trying to start feeding back various patches to do with supporting the hardware I work on. The company also decided upon a name change so I thought I would do this as well. So I moved arch/mips/philips to arch/mips/nxp.

I generated a patch
I ran checkpatch.pl as Ralf suggested before.

I now have pages of errors in the patch

- Line over 80 chars
- printk must have KERN_ debug level
- must have a space after this (, or *)
- use tabs not spaces
- Do not use C99 comments.
To name but a few

My question is:
If you do a patch and find all these errors is it expected that I fix all these problems, or I just make sure my changes do not make it worse!

Dan

#1 lore raw
Quoted 1 line · Daniel Laird

I ran checkpatch.pl as Ralf suggested before.

[...]

Quoted 10 lines

- Line over 80 chars
- printk must have KERN_ debug level
- must have a space after this (, or *)
- use tabs not spaces
- Do not use C99 comments.
To name but a few

My question is:
If you do a patch and find all these errors is it expected that I fix all these problems, or I just make sure my changes do not make it worse!

General rules of thumb:

* Keep the coding style of the file if you're only doing minor patching. Don't introduce leading whitespace, leading tabs before spaces. Maybe keep the comment and indention style.

* If it's more like a rewrite, fix it entirely.

MfG, JBG

Signature · 3 lines
      Jan-Benedict Glaw      [email protected]              +49-172-7608481
Signature of:                 Gib Dein Bestes. Dann übertriff Dich selbst!
the second  :