Skip to content

Commit 61135e9

Browse files
JoePerchestorvalds
authored andcommitted
checkpatch: fix networking kernel-doc block comment defect
checkpatch can generate a false positive when inserting a new kernel-doc block and function above an existing kernel-doc block. Fix it by checking that the context line is also a newly inserted line. Signed-off-by: Joe Perches <joe@perches.com> Reported-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 70dc8a4 commit 61135e9

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎scripts/checkpatch.pl‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2086,6 +2086,7 @@ sub process {
20862086
if ($realfile =~ m@^(drivers/net/|net/)@ &&
20872087
$prevrawline =~ /^\+[ \t]*\/\*/ && #starting /*
20882088
$prevrawline !~ /\*\/[ \t]*$/ && #no trailing */
2089+
$rawline =~ /^\+/ && #line is new
20892090
$rawline !~ /^\+[ \t]*\*/) { #no leading *
20902091
WARN("NETWORKING_BLOCK_COMMENT_STYLE",
20912092
"networking block comments start with * on subsequent lines\n" . $hereprev);

0 commit comments

Comments
 (0)