lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 18 Aug 2008 19:50:00 +0530
From:	Jaswinder Singh <jaswinder@...radead.org>
To:	LKML <linux-kernel@...r.kernel.org>, davej@...emonkey.org.uk,
	jschopp@...tin.ibm.com, apw@...ibm.com,
	David Woodhouse <dwmw2@...radead.org>,
	Peter Zijlstra <peterz@...radead.org>
Subject: BUG: checkpatch

[jsr@...winder 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@...winder 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@...winder 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@...winder 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@...winder 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@...winder jaswinder-git]$ cp test.c test
[jsr@...winder 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@...winder jaswinder-git]$ 



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ