Write and Submit Your First Kernel Patch
Write and Submit Your First Kernel Patch
am 23.10.2009 20:46:24 von unknown
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-fir st-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
am 23.10.2009 21:41:33 von Michal Nazarewicz
--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
>> Kevyn-Alexandre Paré writes:
>>> 0001-Staging-comedi-driver-fix-coding-style.patch:27: ERROR: trailing w=
hitespace
>>> 0001-Staging-comedi-driver-fix-coding-style.patch:35: ERROR: trailing w=
hitespace
>>> 0001-Staging-comedi-driver-fix-coding-style.patch:43: ERROR: trailing w=
hitespace
>>> 0001-Staging-comedi-driver-fix-coding-style.patch:53: ERROR: trailing w=
hitespace
>>>
>>> I have done a step by step explanation of what I have done:
>>> http://kapare.blogspot.com/2009/09/write-and-submit-your-fir st-kernel.h=
tml>>
>>> It seem to me that the whitespace are added after I do this command:
>>> git format-patch -s -n master..mybranch
> On Fri, Oct 23, 2009 at 3:13 PM, Michal Nazarewicz wrote:
>> Do "git rebase --whitespace=3Dfix master" and git will try to fix whites=
paces.
Kevyn-Alexandre Paré writes:
> thx Michal,
>
> But the problem remain:
If I'm not mistaken "git rebase --whitespace=3Dfix master" should do the
trick. I'm out of good ideas if it does not. Best I can advice is to
fix the patch by hand -- just edit it in some decent editor and remove
trailing whitespaces from those lines.
=2D-=20
Best regards, _ _
.o. | Liege of Serenly Enlightened Majesty of o' \,=3D./ `o
..o | Computer Science, Michal "mina86" Nazarewicz (o o)
ooo +------ooO--(_)--Ooo--
--=-=-=
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)
iEYEARECAAYFAkriBvEACgkQUyzLALfG3x535wCfXiB4Rz1/uNltpt4jPUd2 fn8c
aAoAnAhCF4je11wA2ABlNjfxYkiwsqwO
=0e6t
-----END PGP SIGNATURE-----
--=-=-=--
Re: Write and Submit Your First Kernel Patch
am 23.10.2009 21:52:18 von Junio C Hamano
Kevyn-Alexandre Paré writes:
> 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-fir st-kernel=
html
>
> It seem to me that the whitespace are added after I do this command:
> git format-patch -s -n master..mybranch
"The whitespace are added after..." sounds to me that what you committe=
d
were checkpatch compliant, and format-patch somehow broke it. If that =
is
the case we need to fix format-patch.
Please check if "git show $commit" output for the commit that correspon=
ds
to the "[Staging] comedi driver: fix coding style" patch has trailing
whitespaces. That is what you committed.
If there already is whitespace breakage in what you committed, then we =
do
not have to blame format-patch and look for bugs in it to fix.
Otherwise, please send 0001-*.patch (output from format-patch) and outp=
ut
from that "git show $commit" as separate attachments, so that we can de=
bug
and fix format-patch.
Thanks.
Re: Write and Submit Your First Kernel Patch
am 23.10.2009 22:30:25 von unknown
--001636d33c7cfaf8cb0476a014b5
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Thx junio for that analyse!
So what I understand from what you have said is that the problem is
not in format-patch since that I see white space from git show $commit
?!:
history: I was trying to remove coding style problem in
drivers/staging/comedi/drivers/pcl726.c
../scripts/checkpatch.pl --terse --file
drivers/staging/comedi/drivers/pcl726.c #### NO warning after
removing problems
### git commit -a
# was done after that
### git format-patch -s -n master..pcl726
kapare@vostro:~/linux-kernel-patch/linux-2.6$ git show $commit >
TEST.git.show.commit #### see whitespace in vim
kapare@vostro:~/linux-kernel-patch/linux-2.6$ ./scripts/checkpatch.pl
--terse --file TEST.git.show.commit
TEST:19: ERROR: trailing whitespace
TEST:27: ERROR: trailing whitespace
TEST:35: ERROR: trailing whitespace
TEST:45: ERROR: trailing whitespace
TEST:55: ERROR: trailing whitespace
TEST:60: ERROR: trailing whitespace
TEST:67: ERROR: trailing whitespace
TEST:69: ERROR: trailing whitespace
TEST:80: ERROR: trailing whitespace
TEST:106: ERROR: trailing whitespace
TEST:113: ERROR: trailing whitespace
So what am I doing wrong? Any clues? see attachment you ask
thx
kap
On Fri, Oct 23, 2009 at 3:52 PM, Junio C Hamano wrote:
> Kevyn-Alexandre Par=E9 =A0 writes:
>
>> 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 wh=
itespace
>> 0001-Staging-comedi-driver-fix-coding-style.patch:35: ERROR: trailing wh=
itespace
>> 0001-Staging-comedi-driver-fix-coding-style.patch:43: ERROR: trailing wh=
itespace
>> 0001-Staging-comedi-driver-fix-coding-style.patch:53: ERROR: trailing wh=
itespace
>>
>> I have done a step by step explanation of what I have done:
>> http://kapare.blogspot.com/2009/09/write-and-submit-your-fir st-kernel.ht=
ml
>>
>> It seem to me that the whitespace are added after I do this command:
>> git format-patch -s -n master..mybranch
>
> "The whitespace are added after..." sounds to me that what you committed
> were checkpatch compliant, and format-patch somehow broke it. =A0If that =
is
> the case we need to fix format-patch.
>
> Please check if "git show $commit" output for the commit that corresponds
> to the "[Staging] comedi driver: fix coding style" patch has trailing
> whitespaces. =A0That is what you committed.
>
> If there already is whitespace breakage in what you committed, then we do
> not have to blame format-patch and look for bugs in it to fix.
>
> Otherwise, please send 0001-*.patch (output from format-patch) and output
> from that "git show $commit" as separate attachments, so that we can debu=
g
> and fix format-patch.
>
> Thanks.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" i=
n
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at =A0http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs
>
--001636d33c7cfaf8cb0476a014b5
Content-Type: text/x-patch; charset=UTF-8;
name="0001-Staging-comedi-driver-fix-coding-style.patch"
Content-Disposition: attachment;
filename="0001-Staging-comedi-driver-fix-coding-style.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_g15dl2uq0
RnJvbSAyMzEzMjcwMDY4NTgxZmY0MjUxNDBjMWYzNjFiMjZlZGQwOTY2NThm IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiA9P3V0Zi04P3E/S2V2eW4tQWxleGFuZHJl PTIwUGFyPUMzPUE5
Pz0gPGtldnluLmFsZXhhbmRyZS5wYXJlQGdtYWlsLmNvbT4KRGF0ZTogRnJp LCAyMyBPY3QgMjAw
OSAwMDo1OTo0MCAtMDQwMApTdWJqZWN0OiBbUEFUQ0ggMS8xXSBTdGFnaW5n OiBjb21lZGkgZHJp
dmVyOiBmaXggY29kaW5nIHN0eWxlCk1JTUUtVmVyc2lvbjogMS4wCkNvbnRl bnQtVHlwZTogdGV4
dC9wbGFpbjsgY2hhcnNldD11dGYtOApDb250ZW50LVRyYW5zZmVyLUVuY29k aW5nOiA4Yml0CgoK
U2lnbmVkLW9mZi1ieTogS2V2eW4tQWxleGFuZHJlIFBhcsOpIDxrZXZ5bi5h bGV4YW5kcmUucGFy
ZUBnbWFpbC5jb20+Ci0tLQogZH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dW5hYmxlIHRvIGFsbG9j YXRlIElSUSAlZCwi
CisJCQkJCQkiIERJU0FCTElORyBJVCIsIGlycSk7CiAJCQkJCWlycSA9IDA7 CS8qIENhbid0IHVz
ZSBJUlEgKi8KIAkJCQl9IGVsc2UgewogCQkJCQlwcmludGsoIiwgaXJxPSVk IiwgaXJxKTsKQEAg
LTM3Miw5ICszNzIsOCBAQCBzdGF0aWMgaW50IHBjbDcyNl9kZXRhY2goc3Ry dWN0IGNvbWVkaV9k
ZXZpY2UgKmRldikKIC8qIHByaW50aygiY29tZWRpJWQ6IHBjbDcyNjogcmVt b3ZlXG4iLGRldi0+
bWlub3IpOyAqLwogCiAjaWZkZWYgQUNMNjEyNl9JUlEKLQlpZiAoZGV2LT5p cnEpIHsKKwlpZiAo
ZGV2LT5pcnEpCiAJCWZyZWVfaXJxKGRldi0+aXJxLCBkZXYpOwotCX0KICNl bmRpZgogCiAJaWYg
KGRldi0+aW9iYXNlKQotLSAKMS42LjAuNAoK
--001636d33c7cfaf8cb0476a014b5
Content-Type: application/octet-stream; name="TEST.git.show.commit"
Content-Disposition: attachment; filename="TEST.git.show.commit"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_g15dlj451
Y29tbWl0IDIzMTMyNzAwNjg1ODFmZjQyNTE0MGMxZjM2MWIyNmVkZDA5NjY1 OGYKQXV0aG9yOiBL
ZXZ5bi1BbGV4YW5kcmUgUGFyw6kgPGtldnluLmFsZXhhbmRyZS5wYXJlQGdt YWlsLmNvbT4KRGF0
ZTogICBGcmkgT2N0IDIzIDAwOjU5OjQwIDIwMDkgLTA0MDAKCiAgICBTdGFn aW5nOiBjb21lZGkg
ZHJpdmVyOiBmaXggY29kaW5nIHN0eWxlCgpkaWZmIC0tZ2l0IGEvZHJpdmVy cy9zdGFnaW5nL2Nv
bWVkaS9kcml2ZXJzL3BjbDcyNi5jIGIvZHJpdmVycy9zdGFnaW5nL2NvbWVk aS9kcml2ZXJzL3Bj
bDcyNi5jCmluZGV4IGNj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ogcHJpbnRrKCJjb21lZGklZDogcGNsNzI2OiByZW1vdmVcbiIsZGV2 LT5taW5vcik7ICov
CiAKICNpZmRlZiBBQ0w2MTI2X0lSUQotCWlmIChkZXYtPmlycSkgeworCWlm IChkZXYtPmlycSkK
IAkJZnJlZV9pcnEoZGV2LT5pcnEsIGRldik7Ci0JfQogI2VuZGlmCiAKIAlp ZiAoZGV2LT5pb2Jh
c2UpCg==
--001636d33c7cfaf8cb0476a014b5--
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: Write and Submit Your First Kernel Patch
am 23.10.2009 22:33:04 von Daniel Barkalow
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
--1547844168-581943078-1256329969=:14365
Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-15
Content-Transfer-Encoding: 8BIT
Content-ID:
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*
--1547844168-581943078-1256329969=:14365--
Re: Write and Submit Your First Kernel Patch
am 23.10.2009 22:34:03 von unknown
--000e0cd4a5b2f773640476a021b2
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
I forgot my .c file
On Fri, Oct 23, 2009 at 4:30 PM, Kevyn-Alexandre Par=E9
wrote:
> Thx junio for that analyse!
>
> So what I understand from what you have said is that the problem is
> not in format-patch since that I see white space from git show $commit
> ?!:
>
> history: I was trying to remove coding style problem in
> drivers/staging/comedi/drivers/pcl726.c
>
> ./scripts/checkpatch.pl --terse --file
> drivers/staging/comedi/drivers/pcl726.c =A0 =A0 =A0 =A0#### NO warning af=
ter
> removing problems
> ### git commit -a
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0# was done after that
> ### git format-patch -s -n master..pcl726
>
> kapare@vostro:~/linux-kernel-patch/linux-2.6$ git show $commit >
> TEST.git.show.commit =A0 =A0 =A0#### see whitespace in vim
> kapare@vostro:~/linux-kernel-patch/linux-2.6$ ./scripts/checkpatch.pl
> --terse --file TEST.git.show.commit
> TEST:19: ERROR: trailing whitespace
> TEST:27: ERROR: trailing whitespace
> TEST:35: ERROR: trailing whitespace
> TEST:45: ERROR: trailing whitespace
> TEST:55: ERROR: trailing whitespace
> TEST:60: ERROR: trailing whitespace
> TEST:67: ERROR: trailing whitespace
> TEST:69: ERROR: trailing whitespace
> TEST:80: ERROR: trailing whitespace
> TEST:106: ERROR: trailing whitespace
> TEST:113: ERROR: trailing whitespace
>
> So what am I doing wrong? Any clues? see attachment you ask
>
> thx
>
> kap
>
> On Fri, Oct 23, 2009 at 3:52 PM, Junio C Hamano wrote=
:
>> Kevyn-Alexandre Par=E9 =A0 writes:
>>
>>> 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 w=
hitespace
>>> 0001-Staging-comedi-driver-fix-coding-style.patch:35: ERROR: trailing w=
hitespace
>>> 0001-Staging-comedi-driver-fix-coding-style.patch:43: ERROR: trailing w=
hitespace
>>> 0001-Staging-comedi-driver-fix-coding-style.patch:53: ERROR: trailing w=
hitespace
>>>
>>> I have done a step by step explanation of what I have done:
>>> http://kapare.blogspot.com/2009/09/write-and-submit-your-fir st-kernel.h=
tml
>>>
>>> It seem to me that the whitespace are added after I do this command:
>>> git format-patch -s -n master..mybranch
>>
>> "The whitespace are added after..." sounds to me that what you committed
>> were checkpatch compliant, and format-patch somehow broke it. =A0If that=
is
>> the case we need to fix format-patch.
>>
>> Please check if "git show $commit" output for the commit that correspond=
s
>> to the "[Staging] comedi driver: fix coding style" patch has trailing
>> whitespaces. =A0That is what you committed.
>>
>> If there already is whitespace breakage in what you committed, then we d=
o
>> not have to blame format-patch and look for bugs in it to fix.
>>
>> Otherwise, please send 0001-*.patch (output from format-patch) and outpu=
t
>> from that "git show $commit" as separate attachments, so that we can deb=
ug
>> and fix format-patch.
>>
>> Thanks.
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-newbie" =
in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at =A0http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at http://www.linux-learn.org/faqs
>>
>
--000e0cd4a5b2f773640476a021b2
Content-Type: text/x-csrc; charset=US-ASCII; name="pcl726.c"
Content-Disposition: attachment; filename="pcl726.c"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_g15ede7b2
LyoKICAgIGNvbWVkaS9kcml2ZXJzL3BjbDcyNi5jCgogICAgaGFyZHdhcmUg ZHJpdmVyIGZvciBB
ZHZhbnRlY2ggY2FyZHM6CiAgICAgY2FyZDogICBQQ0wtNzI2LCBQQ0wtNzI3 LCBQQ0wtNzI4CiAg
ICAgZHJpdmVyOiBwY2w3MjYsICBwY2w3MjcsICBwY2w3MjgKICAgIGFuZCBm b3IgQURMaW5rIGNh
cmRzOgogICAgIGNhcmQ6ICAgQUNMLTYxMjYsIEFDTC02MTI4CiAgICAgZHJp dmVyOiBhY2w2MTI2
LCAgYWNsNjEyOAoKICAgIENPTUVESSAtIExpbnV4IENvbnRyb2wgYW5kIE1l YXN1cmVtZW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OiByZW1vdmVc
biIsZGV2LT5taW5vcik7ICovCgojaWZkZWYgQUNMNjEyNl9JUlEKCWlmIChk ZXYtPmlycSkKCQlm
cmVlX2lycShkZXYtPmlycSwgZGV2KTsKI2VuZGlmCgoJaWYgKGRldi0+aW9i YXNlKQoJCXJlbGVh
c2VfcmVnaW9uKGRldi0+aW9iYXNlLCB0aGlzX2JvYXJkLT5pb19yYW5nZSk7 CgoJcmV0dXJuIDA7
Cn0K
--000e0cd4a5b2f773640476a021b2--
Re: Write and Submit Your First Kernel Patch
am 23.10.2009 22:58:05 von Junio C Hamano
Daniel Barkalow writes:
> On Fri, 23 Oct 2009, Kevyn-Alexandre Paré wrote:
>
>> 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 yo=
ur=20
> patch to be added to the kernel source as a file, but rather applied =
to=20
> the kernel source, changing other files. (I bet "gcc 0001-Staging*.pa=
tch"=20
> will get interesting errors, too...) The patch format adds a single=20
> character at the beginning of each line to say whether it's a additio=
n, a=20
> deletion, or a context line, and the context lines are identified by =
a=20
> space character. This means that a blank context line consists of jus=
t=20
> this space character, which is therefore a trailing space. We get the=
same=20
> type of complaints when we have expected diff output in our test scri=
pts.
>
> I'm kind of surprised that checkpatch doesn't completely blow up when=
it's=20
> expecting a source file and getting a patch (and maybe tell you what=20
> you've done). But that's the source of your errors, anyway.
Ah, your analysis is correct. This is a usage error of checkpatch scri=
pt
and there is nothing for us to worry about.
Thanks; I also failed to spot --file option when I responded.
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie"=
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: Write and Submit Your First Kernel Patch
am 23.10.2009 23:26:25 von unknown
My mistake but I learn a lot from you guys!
I should simply have done:
/scripts/checkpatch.pl --terse --patch
0001-Staging-comedi-driver-fix-coding-style.patch
or
/scripts/checkpatch.pl --terse --patch
0001-Staging-comedi-driver-fix-coding-style.patch
# Since --patch is the default!
No warning to the output, I will change my blog
thx again
kap
On Fri, Oct 23, 2009 at 4:58 PM, Junio C Hamano wro=
te:
> Daniel Barkalow writes:
>
>> On Fri, 23 Oct 2009, Kevyn-Alexandre Par=E9 wrote:
>>
>>> 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 y=
our
>> 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*.p=
atch"
>> will get interesting errors, too...) The patch format adds a single
>> character at the beginning of each line to say whether it's a additi=
on, 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 ju=
st
>> this space character, which is therefore a trailing space. We get th=
e same
>> type of complaints when we have expected diff output in our test scr=
ipts.
>>
>> I'm kind of surprised that checkpatch doesn't completely blow up whe=
n 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.
>
> Ah, your analysis is correct. =A0This is a usage error of checkpatch =
script
> and there is nothing for us to worry about.
>
> Thanks; I also failed to spot --file option when I responded.
>
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie"=
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs