* BUG: checkpatch
@ 2008-08-18 14:20 Jaswinder Singh
2008-08-26 14:28 ` Andy Whitcroft
0 siblings, 1 reply; 2+ messages in thread
From: Jaswinder Singh @ 2008-08-18 14:20 UTC (permalink / raw)
To: LKML, davej, jschopp, apw, David Woodhouse, Peter Zijlstra
[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]$
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: BUG: checkpatch
2008-08-18 14:20 BUG: checkpatch Jaswinder Singh
@ 2008-08-26 14:28 ` Andy Whitcroft
0 siblings, 0 replies; 2+ messages in thread
From: Andy Whitcroft @ 2008-08-26 14:28 UTC (permalink / raw)
To: Jaswinder Singh; +Cc: LKML, davej, jschopp, David Woodhouse, Peter Zijlstra
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-08-26 14:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-18 14:20 BUG: checkpatch Jaswinder Singh
2008-08-26 14:28 ` Andy Whitcroft
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox