aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-04-03 17:49:20 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-03 19:21:14 -0400
commit85ad978c626a425c0bacd137bf15403e867c9134 (patch)
treecc24574de1dce4d72b65410d9c0d6391de9018ca /scripts/checkpatch.pl
parentcbec18afcc82a9b49953aeaa39ecb5ed553e3509 (diff)
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@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index ae9f71d27a85..c624b04d0070 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2219,7 +2219,8 @@ sub process {
2219 2219
2220 if ($realfile =~ m@^(drivers/net/|net/)@ && 2220 if ($realfile =~ m@^(drivers/net/|net/)@ &&
2221 $prevrawline =~ /^\+[ \t]*\/\*[ \t]*$/ && 2221 $prevrawline =~ /^\+[ \t]*\/\*[ \t]*$/ &&
2222 $rawline =~ /^\+[ \t]*\*/) { 2222 $rawline =~ /^\+[ \t]*\*/ &&
2223 $realline > 2) {
2223 WARN("NETWORKING_BLOCK_COMMENT_STYLE", 2224 WARN("NETWORKING_BLOCK_COMMENT_STYLE",
2224 "networking block comments don't use an empty /* line, use /* Comment...\n" . $hereprev); 2225 "networking block comments don't use an empty /* line, use /* Comment...\n" . $hereprev);
2225 } 2226 }