From: Andy Whitcroft <andyw@uk.ibm.com>
To: Jaswinder Singh <jaswinder@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
davej@codemonkey.org.uk, jschopp@austin.ibm.com,
David Woodhouse <dwmw2@infradead.org>,
Peter Zijlstra <peterz@infradead.org>
Subject: Re: BUG: checkpatch
Date: Tue, 26 Aug 2008 15:28:25 +0100 [thread overview]
Message-ID: <20080826142825.GG29207@brain> (raw)
In-Reply-To: <1219069200.3208.4.camel@jaswinder.satnam>
On Mon, Aug 18, 2008 at 07:50:00PM +0530, Jaswinder Singh wrote:
> [jsr@jaswinder jaswinder-git]$ cat test.c
> void test(int i, int j, int k)
> {
> printk(KERN_INFO "/* Testing i, j, k */\n");
> printk(KERN_INFO "i: %d j: %d k:%d\n", i, j, k);
> }
> [jsr@jaswinder jaswinder-git]$ ./linux-2.6/scripts/checkpatch.pl --file test.c
> ERROR: spaces required around that ':' (ctx:VxW)
> #4: FILE: test.c:4:
> + printk(KERN_INFO "i: %d j: %d k:%d\n", i, j, k);
> ^
>
> ERROR: need consistent spacing around '%' (ctx:WxV)
> #4: FILE: test.c:4:
> + printk(KERN_INFO "i: %d j: %d k:%d\n", i, j, k);
> ^
>
> ERROR: spaces required around that ':' (ctx:VxW)
> #4: FILE: test.c:4:
> + printk(KERN_INFO "i: %d j: %d k:%d\n", i, j, k);
> ^
>
> ERROR: need consistent spacing around '%' (ctx:WxV)
> #4: FILE: test.c:4:
> + printk(KERN_INFO "i: %d j: %d k:%d\n", i, j, k);
> ^
>
> ERROR: spaces required around that ':' (ctx:VxO)
> #4: FILE: test.c:4:
> + printk(KERN_INFO "i: %d j: %d k:%d\n", i, j, k);
> ^
>
> total: 5 errors, 0 warnings, 5 lines checked
>
> test.c has style problems, please review. If any of these errors
> are false positives report them to the maintainer, see
> CHECKPATCH in MAINTAINERS.
> [jsr@jaswinder jaswinder-git]$ cat test_working.c
> void test(int i, int j, int k)
> {
> printk(KERN_INFO "/* Testing i, j, k * /\n");
> printk(KERN_INFO "i: %d j: %d k:%d\n", i, j, k);
> }
> [jsr@jaswinder jaswinder-git]$ ./linux-2.6/scripts/checkpatch.pl --file test_working.c
> total: 0 errors, 0 warnings, 5 lines checked
>
> test_working.c has no obvious style problems and is ready for submission.
> [jsr@jaswinder jaswinder-git]$ diff -uN test.c test_working.c
> --- test.c 2008-08-18 19:38:32.000000000 +0530
> +++ test_working.c 2008-08-18 19:38:37.000000000 +0530
> @@ -1,5 +1,5 @@
> void test(int i, int j, int k)
> {
> - printk(KERN_INFO "/* Testing i, j, k */\n");
> + printk(KERN_INFO "/* Testing i, j, k * /\n");
> printk(KERN_INFO "i: %d j: %d k:%d\n", i, j, k);
> }
> [jsr@jaswinder jaswinder-git]$ cp test.c test
> [jsr@jaswinder jaswinder-git]$ ./linux-2.6/scripts/checkpatch.pl --file test
> total: 0 errors, 0 warnings, 5 lines checked
>
> test has no obvious style problems and is ready for submission.
> [jsr@jaswinder jaswinder-git]$
Bah, a trivial bug in the comments/quote matcher leading to the apparent
close comment taking effect when quoted. Should be fixed in my next
batch of updates to akpm (0.23).
-apw
prev parent reply other threads:[~2008-08-26 14:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-18 14:20 BUG: checkpatch Jaswinder Singh
2008-08-26 14:28 ` Andy Whitcroft [this message]
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=20080826142825.GG29207@brain \
--to=andyw@uk.ibm.com \
--cc=davej@codemonkey.org.uk \
--cc=dwmw2@infradead.org \
--cc=jaswinder@infradead.org \
--cc=jschopp@austin.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.