git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Write and Submit Your First Kernel Patch

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Oct 23, 2009, 20:33 UTC
Message-ID
<alpine.LNX.2.00.0910231621550.14365@iabervon.org>
In-Reply-To
<dc1d0f40910231146y14028f4el9753debdf334103@mail.gmail.com>
On Fri, 23 Oct 2009, Kevyn-Alexandre Paré wrote:
Show 5 quoted lines
> 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*
Previous: Kevyn-Alexandre ParéNext: Junio C Hamano
Message 5 of 8 in “Write and Submit Your First Kernel Patch”
  1. Kevyn-Alexandre ParéOct 23, 2009
  2. Junio C HamanoOct 23, 2009
  3. Kevyn-Alexandre ParéOct 23, 2009
  4. Kevyn-Alexandre ParéOct 23, 2009
  5. Daniel BarkalowOct 23, 2009
  6. Junio C HamanoOct 23, 2009
  7. Kevyn-Alexandre ParéOct 23, 2009
  8. Michal NazarewiczOct 23, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.