[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <3da3ed6658e3cd7dd2a36674d921ef9044ae0c3c.1393443451.git.joe@perches.com>
Date: Wed, 26 Feb 2014 11:38:49 -0800
From: Joe Perches <joe@...ches.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] checkpatch: Ignore networking block comment style first lines in file
It's very common to have normal block comments for the initial
comments of a file description preface.
So for files in drivers/net and net/ don't emit a warning when
the first comment block in the file uses the normal block comment
style and not the networking block comment style.
Signed-off-by: Joe Perches <joe@...ches.com>
---
scripts/checkpatch.pl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index ae9f71d..c624b04 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2219,7 +2219,8 @@ sub process {
if ($realfile =~ m@^(drivers/net/|net/)@ &&
$prevrawline =~ /^\+[ \t]*\/\*[ \t]*$/ &&
- $rawline =~ /^\+[ \t]*\*/) {
+ $rawline =~ /^\+[ \t]*\*/ &&
+ $realline > 2) {
WARN("NETWORKING_BLOCK_COMMENT_STYLE",
"networking block comments don't use an empty /* line, use /* Comment...\n" . $hereprev);
}
--
1.8.1.2.459.gbcd45b4.dirty
--
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