Commit fdb4bcd6 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds

checkpatch: improve network block comment test and message

Show the first line of the comment after a line with just /* to better
show where the defective comment style is in the file.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 807bd26c
......@@ -1891,8 +1891,8 @@ sub process {
}
if ($realfile =~ m@^(drivers/net/|net/)@ &&
$rawline =~ /^\+[ \t]*\/\*[ \t]*$/ &&
$prevrawline =~ /^\+[ \t]*$/) {
$prevrawline =~ /^\+[ \t]*\/\*[ \t]*$/ &&
$rawline =~ /^\+[ \t]*\*/) {
WARN("NETWORKING_BLOCK_COMMENT_STYLE",
"networking block comments don't use an empty /* line, use /* Comment...\n" . $hereprev);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment