mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
807bd26c4c
commit
fdb4bcd610
|
@ -1891,8 +1891,8 @@ sub process {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($realfile =~ m@^(drivers/net/|net/)@ &&
|
if ($realfile =~ m@^(drivers/net/|net/)@ &&
|
||||||
$rawline =~ /^\+[ \t]*\/\*[ \t]*$/ &&
|
$prevrawline =~ /^\+[ \t]*\/\*[ \t]*$/ &&
|
||||||
$prevrawline =~ /^\+[ \t]*$/) {
|
$rawline =~ /^\+[ \t]*\*/) {
|
||||||
WARN("NETWORKING_BLOCK_COMMENT_STYLE",
|
WARN("NETWORKING_BLOCK_COMMENT_STYLE",
|
||||||
"networking block comments don't use an empty /* line, use /* Comment...\n" . $hereprev);
|
"networking block comments don't use an empty /* line, use /* Comment...\n" . $hereprev);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue