From: "Kevyn-Alexandre Paré" <kevyn.alexandre.pare@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: linux-newbie@vger.kernel.org, kernel-janitors@vger.kernel.org,
git@vger.kernel.org
Subject: Re: Write and Submit Your First Kernel Patch
Date: Fri, 23 Oct 2009 16:30:25 -0400 [thread overview]
Message-ID: <dc1d0f40910231330n7cc521d0n52aac929c334bc9d@mail.gmail.com> (raw)
In-Reply-To: <7v8wf1c2h9.fsf@alter.siamese.dyndns.org>
[-- Attachment #1: Type: text/plain, Size: 3149 bytes --]
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 <gitster@pobox.com> wrote:
> Kevyn-Alexandre Paré <kevyn.alexandre.pare@gmail.com> 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-first-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 committed
> 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 corresponds
> 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 output
> from that "git show $commit" as separate attachments, so that we can debug
> 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 http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs
>
[-- Attachment #2: 0001-Staging-comedi-driver-fix-coding-style.patch --]
[-- Type: text/x-patch, Size: 4017 bytes --]
From 2313270068581ff425140c1f361b26edd096658f Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Kevyn-Alexandre=20Par=C3=A9?= <kevyn.alexandre.pare@gmail.com>
Date: Fri, 23 Oct 2009 00:59:40 -0400
Subject: [PATCH 1/1] Staging: comedi driver: fix coding style
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Kevyn-Alexandre Paré <kevyn.alexandre.pare@gmail.com>
---
drivers/staging/comedi/drivers/pcl726.c | 41 +++++++++++++++----------------
1 files changed, 20 insertions(+), 21 deletions(-)
diff --git a/drivers/staging/comedi/drivers/pcl726.c b/drivers/staging/comedi/drivers/pcl726.c
index ccadd09..6208bca 100644
--- a/drivers/staging/comedi/drivers/pcl726.c
+++ b/drivers/staging/comedi/drivers/pcl726.c
@@ -39,27 +39,27 @@ Interrupts are not supported.
Options for PCL-726:
[0] - IO Base
[2]...[7] - D/A output range for channel 1-6:
- 0: 0-5V, 1: 0-10V, 2: +/-5V, 3: +/-10V,
- 4: 4-20mA, 5: unknown (external reference)
+ 0: 0-5V, 1: 0-10V, 2: +/-5V, 3: +/-10V,
+ 4: 4-20mA, 5: unknown (external reference)
Options for PCL-727:
[0] - IO Base
[2]...[13] - D/A output range for channel 1-12:
- 0: 0-5V, 1: 0-10V, 2: +/-5V,
- 3: 4-20mA
+ 0: 0-5V, 1: 0-10V, 2: +/-5V,
+ 3: 4-20mA
Options for PCL-728 and ACL-6128:
[0] - IO Base
[2], [3] - D/A output range for channel 1 and 2:
- 0: 0-5V, 1: 0-10V, 2: +/-5V, 3: +/-10V,
- 4: 4-20mA, 5: 0-20mA
+ 0: 0-5V, 1: 0-10V, 2: +/-5V, 3: +/-10V,
+ 4: 4-20mA, 5: 0-20mA
Options for ACL-6126:
[0] - IO Base
[1] - IRQ (0=disable, 3, 5, 6, 7, 9, 10, 11, 12, 15) (currently ignored)
[2]...[7] - D/A output range for channel 1-6:
- 0: 0-5V, 1: 0-10V, 2: +/-5V, 3: +/-10V,
- 4: 4-20mA
+ 0: 0-5V, 1: 0-10V, 2: +/-5V, 3: +/-10V,
+ 4: 4-20mA
*/
/*
@@ -127,7 +127,8 @@ struct pcl726_board {
int di_lo;
int do_hi;
int do_lo;
- const struct comedi_lrange *const *range_type_list; /* list of supported ranges */
+ const struct comedi_lrange *const *range_type_list;
+ /* list of supported ranges */
};
static const struct pcl726_board boardtypes[] = {
@@ -204,9 +205,8 @@ static int pcl726_ao_insn_read(struct comedi_device *dev,
int chan = CR_CHAN(insn->chanspec);
int n;
- for (n = 0; n < insn->n; n++) {
+ for (n = 0; n < insn->n; n++)
data[n] = devpriv->ao_readback[chan];
- }
return n;
}
@@ -256,10 +256,10 @@ static int pcl726_attach(struct comedi_device *dev, struct comedi_devconfig *it)
iobase = it->options[0];
iorange = this_board->io_range;
- printk("comedi%d: pcl726: board=%s, 0x%03lx ", dev->minor,
+ printk(KERN_WARNING, "comedi%d: pcl726: board=%s, 0x%03lx ", dev->minor,
this_board->name, iobase);
if (!request_region(iobase, iorange, "pcl726")) {
- printk("I/O port conflict\n");
+ printk(KERN_WARNING, "I/O port conflict\n");
return -EIO;
}
@@ -283,16 +283,16 @@ static int pcl726_attach(struct comedi_device *dev, struct comedi_devconfig *it)
devpriv->first_chan = 2;
if (irq) { /* we want to use IRQ */
if (((1 << irq) & boardtypes[board].IRQbits) == 0) {
- printk
- (", IRQ %d is out of allowed range, DISABLING IT",
- irq);
+ printk(KERN_WARNING,
+ ", IRQ %d is out of allowed range,"
+ " DISABLING IT", irq);
irq = 0; /* Bad IRQ */
} else {
if (request_irq(irq, interrupt_pcl818, 0,
"pcl726", dev)) {
- printk
- (", unable to allocate IRQ %d, DISABLING IT",
- irq);
+ printk(KERN_WARNING,
+ ", unable to allocate IRQ %d,"
+ " DISABLING IT", irq);
irq = 0; /* Can't use IRQ */
} else {
printk(", irq=%d", irq);
@@ -372,9 +372,8 @@ static int pcl726_detach(struct comedi_device *dev)
/* printk("comedi%d: pcl726: remove\n",dev->minor); */
#ifdef ACL6126_IRQ
- if (dev->irq) {
+ if (dev->irq)
free_irq(dev->irq, dev);
- }
#endif
if (dev->iobase)
--
1.6.0.4
[-- Attachment #3: TEST.git.show.commit --]
[-- Type: application/octet-stream, Size: 3652 bytes --]
commit 2313270068581ff425140c1f361b26edd096658f
Author: Kevyn-Alexandre Paré <kevyn.alexandre.pare@gmail.com>
Date: Fri Oct 23 00:59:40 2009 -0400
Staging: comedi driver: fix coding style
diff --git a/drivers/staging/comedi/drivers/pcl726.c b/drivers/staging/comedi/drivers/pcl726.c
index ccadd09..6208bca 100644
--- a/drivers/staging/comedi/drivers/pcl726.c
+++ b/drivers/staging/comedi/drivers/pcl726.c
@@ -39,27 +39,27 @@ Interrupts are not supported.
Options for PCL-726:
[0] - IO Base
[2]...[7] - D/A output range for channel 1-6:
- 0: 0-5V, 1: 0-10V, 2: +/-5V, 3: +/-10V,
- 4: 4-20mA, 5: unknown (external reference)
+ 0: 0-5V, 1: 0-10V, 2: +/-5V, 3: +/-10V,
+ 4: 4-20mA, 5: unknown (external reference)
Options for PCL-727:
[0] - IO Base
[2]...[13] - D/A output range for channel 1-12:
- 0: 0-5V, 1: 0-10V, 2: +/-5V,
- 3: 4-20mA
+ 0: 0-5V, 1: 0-10V, 2: +/-5V,
+ 3: 4-20mA
Options for PCL-728 and ACL-6128:
[0] - IO Base
[2], [3] - D/A output range for channel 1 and 2:
- 0: 0-5V, 1: 0-10V, 2: +/-5V, 3: +/-10V,
- 4: 4-20mA, 5: 0-20mA
+ 0: 0-5V, 1: 0-10V, 2: +/-5V, 3: +/-10V,
+ 4: 4-20mA, 5: 0-20mA
Options for ACL-6126:
[0] - IO Base
[1] - IRQ (0=disable, 3, 5, 6, 7, 9, 10, 11, 12, 15) (currently ignored)
[2]...[7] - D/A output range for channel 1-6:
- 0: 0-5V, 1: 0-10V, 2: +/-5V, 3: +/-10V,
- 4: 4-20mA
+ 0: 0-5V, 1: 0-10V, 2: +/-5V, 3: +/-10V,
+ 4: 4-20mA
*/
/*
@@ -127,7 +127,8 @@ struct pcl726_board {
int di_lo;
int do_hi;
int do_lo;
- const struct comedi_lrange *const *range_type_list; /* list of supported ranges */
+ const struct comedi_lrange *const *range_type_list;
+ /* list of supported ranges */
};
static const struct pcl726_board boardtypes[] = {
@@ -204,9 +205,8 @@ static int pcl726_ao_insn_read(struct comedi_device *dev,
int chan = CR_CHAN(insn->chanspec);
int n;
- for (n = 0; n < insn->n; n++) {
+ for (n = 0; n < insn->n; n++)
data[n] = devpriv->ao_readback[chan];
- }
return n;
}
@@ -256,10 +256,10 @@ static int pcl726_attach(struct comedi_device *dev, struct comedi_devconfig *it)
iobase = it->options[0];
iorange = this_board->io_range;
- printk("comedi%d: pcl726: board=%s, 0x%03lx ", dev->minor,
+ printk(KERN_WARNING, "comedi%d: pcl726: board=%s, 0x%03lx ", dev->minor,
this_board->name, iobase);
if (!request_region(iobase, iorange, "pcl726")) {
- printk("I/O port conflict\n");
+ printk(KERN_WARNING, "I/O port conflict\n");
return -EIO;
}
@@ -283,16 +283,16 @@ static int pcl726_attach(struct comedi_device *dev, struct comedi_devconfig *it)
devpriv->first_chan = 2;
if (irq) { /* we want to use IRQ */
if (((1 << irq) & boardtypes[board].IRQbits) == 0) {
- printk
- (", IRQ %d is out of allowed range, DISABLING IT",
- irq);
+ printk(KERN_WARNING,
+ ", IRQ %d is out of allowed range,"
+ " DISABLING IT", irq);
irq = 0; /* Bad IRQ */
} else {
if (request_irq(irq, interrupt_pcl818, 0,
"pcl726", dev)) {
- printk
- (", unable to allocate IRQ %d, DISABLING IT",
- irq);
+ printk(KERN_WARNING,
+ ", unable to allocate IRQ %d,"
+ " DISABLING IT", irq);
irq = 0; /* Can't use IRQ */
} else {
printk(", irq=%d", irq);
@@ -372,9 +372,8 @@ static int pcl726_detach(struct comedi_device *dev)
/* printk("comedi%d: pcl726: remove\n",dev->minor); */
#ifdef ACL6126_IRQ
- if (dev->irq) {
+ if (dev->irq)
free_irq(dev->irq, dev);
- }
#endif
if (dev->iobase)
next prev parent reply other threads:[~2009-10-23 20:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-23 18:46 Write and Submit Your First Kernel Patch Kevyn-Alexandre Paré
[not found] ` <87zl7hudn4.fsf@erwin.mina86.com>
[not found] ` <dc1d0f40910231219l600d3579i57c7580fe798d445@mail.gmail.com>
2009-10-23 19:41 ` Michal Nazarewicz
2009-10-23 19:52 ` Junio C Hamano
2009-10-23 20:30 ` Kevyn-Alexandre Paré [this message]
2009-10-23 20:34 ` Kevyn-Alexandre Paré
2009-10-23 20:33 ` Daniel Barkalow
2009-10-23 20:58 ` Junio C Hamano
2009-10-23 21:26 ` Kevyn-Alexandre Paré
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dc1d0f40910231330n7cc521d0n52aac929c334bc9d@mail.gmail.com \
--to=kevyn.alexandre.pare@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-newbie@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).