Write and Submit Your First Kernel Patch

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Write and Submit Your First Kernel Patch

From: Kevyn-Alexandre Paré <hidden>
Date: 2016-06-15 22:47:36

Hi,

Just before I send my patch I got this error with:
./scripts/checkpatch.pl --terse --file
0001-Staging-comedi-driver-fix-coding-style.patch

0001-Staging-comedi-driver-fix-coding-style.patch:27: ERROR: trailing whitespace
0001-Staging-comedi-driver-fix-coding-style.patch:35: ERROR: trailing whitespace
0001-Staging-comedi-driver-fix-coding-style.patch:43: ERROR: trailing whitespace
0001-Staging-comedi-driver-fix-coding-style.patch:53: ERROR: trailing whitespace

I have done a step by step explanation of what I have done:
http://kapare.blogspot.com/2009/09/write-and-submit-your-first-kernel.html

It seem to me that the whitespace are added after I do this command:
git format-patch -s -n master..mybranch

Can someone help me with that because google did help me to found the answer?

Thx

kap

Re: Write and Submit Your First Kernel Patch

From: Daniel Barkalow <hidden>
Date: 2016-06-15 22:47:36

On Fri, 23 Oct 2009, Kevyn-Alexandre Paré wrote:
Hi,

Just before I send my patch I got this error with:
./scripts/checkpatch.pl --terse --file
0001-Staging-comedi-driver-fix-coding-style.patch
You're using checkpatch --file on a patch. I hope you don't intend your 
patch to be added to the kernel source as a file, but rather applied to 
the kernel source, changing other files. (I bet "gcc 0001-Staging*.patch" 
will get interesting errors, too...) The patch format adds a single 
character at the beginning of each line to say whether it's a addition, a 
deletion, or a context line, and the context lines are identified by a 
space character. This means that a blank context line consists of just 
this space character, which is therefore a trailing space. We get the same 
type of complaints when we have expected diff output in our test scripts.

I'm kind of surprised that checkpatch doesn't completely blow up when it's 
expecting a source file and getting a patch (and maybe tell you what 
you've done). But that's the source of your errors, anyway.

	-Daniel
*This .sig left intentionally blank*
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help