From: Joe Perches Date: Wed, 11 Sep 2013 21:23:59 +0000 (-0700) Subject: checkpatch: fix networking kernel-doc block comment defect X-Git-Tag: v4.13~8777^2~113 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=61135e966367eda5056504ffd2f7518eaf77e25b;p=mirror_ubuntu-bionic-kernel.git 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 Reported-by: Darren Hart Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index e2cb1f4621b7..9185883f5885 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2086,6 +2086,7 @@ sub process { if ($realfile =~ m@^(drivers/net/|net/)@ && $prevrawline =~ /^\+[ \t]*\/\*/ && #starting /* $prevrawline !~ /\*\/[ \t]*$/ && #no trailing */ + $rawline =~ /^\+/ && #line is new $rawline !~ /^\+[ \t]*\*/) { #no leading * WARN("NETWORKING_BLOCK_COMMENT_STYLE", "networking block comments start with * on subsequent lines\n" . $hereprev);