]> git.karo-electronics.de Git - karo-tx-linux.git/commit
checkpatch: check networking specific block comment style
authorJoe Perches <joe@perches.com>
Fri, 21 Sep 2012 01:02:13 +0000 (11:02 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 25 Sep 2012 08:46:40 +0000 (18:46 +1000)
commit96575cfb2fa78a8f6ffda072cdcbc11e0c6e55fa
treec38ea52b85a215f2315c1a46faa9a97390867788
parentcf4cce237a71629ee6c0ac097f2306f8e51f631c
checkpatch: check networking specific block comment style

In an effort to get fewer checkpatch reviewer corrections, add a
networking specific style test for the preferred networking comment style.

/* The preferred style for block comments in
 * drivers/net/... and net/... is like this
 */

These tests are only used in net/ and drivers/net/

Tested with:

$ cat drivers/net/t.c

/* foo */

/*
 * foo
 */

/* foo
 */

/* foo
 * bar */
$ ./scripts/checkpatch.pl -f drivers/net/t.c
WARNING: networking block comments don't use an empty /* line, use /* Comment...
#4: FILE: net/t.c:4:
+
+/*

WARNING: networking block comments put the trailing */ on a separate line
#12: FILE: net/t.c:12:
+ * bar */

total: 0 errors, 2 warnings, 12 lines checked

Signed-off-by: Joe Perches <joe@perches.com>
Cc: "Allan, Bruce W" <bruce.w.allan@intel.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
scripts/checkpatch.pl