Skip to content

Commit fdb4bcd

Browse files
JoePerchestorvalds
authored andcommitted
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: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 807bd26 commit fdb4bcd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎scripts/checkpatch.pl‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1891,8 +1891,8 @@ sub process {
18911891
}
18921892

18931893
if ($realfile =~ m@^(drivers/net/|net/)@ &&
1894-
$rawline =~ /^\+[ \t]*\/\*[ \t]*$/ &&
1895-
$prevrawline =~ /^\+[ \t]*$/) {
1894+
$prevrawline =~ /^\+[ \t]*\/\*[ \t]*$/ &&
1895+
$rawline =~ /^\+[ \t]*\*/) {
18961896
WARN("NETWORKING_BLOCK_COMMENT_STYLE",
18971897
"networking block comments don't use an empty /* line, use /* Comment...\n" . $hereprev);
18981898
}

0 commit comments

Comments
 (0)