diff options
author | Joe Perches <joe@perches.com> | 2013-09-11 17:23:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-11 18:58:44 -0400 |
commit | 61135e966367eda5056504ffd2f7518eaf77e25b (patch) | |
tree | 147fa33fb15f77eb5af50ad845ea19ba00f3cae9 /scripts/checkpatch.pl | |
parent | 70dc8a48357ce630d8a76887a9a36f0d34c8caf2 (diff) |
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>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-x | scripts/checkpatch.pl | 1 |
1 files changed, 1 insertions, 0 deletions
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 { | |||
2086 | if ($realfile =~ m@^(drivers/net/|net/)@ && | 2086 | if ($realfile =~ m@^(drivers/net/|net/)@ && |
2087 | $prevrawline =~ /^\+[ \t]*\/\*/ && #starting /* | 2087 | $prevrawline =~ /^\+[ \t]*\/\*/ && #starting /* |
2088 | $prevrawline !~ /\*\/[ \t]*$/ && #no trailing */ | 2088 | $prevrawline !~ /\*\/[ \t]*$/ && #no trailing */ |
2089 | $rawline =~ /^\+/ && #line is new | ||
2089 | $rawline !~ /^\+[ \t]*\*/) { #no leading * | 2090 | $rawline !~ /^\+[ \t]*\*/) { #no leading * |
2090 | WARN("NETWORKING_BLOCK_COMMENT_STYLE", | 2091 | WARN("NETWORKING_BLOCK_COMMENT_STYLE", |
2091 | "networking block comments start with * on subsequent lines\n" . $hereprev); | 2092 | "networking block comments start with * on subsequent lines\n" . $hereprev); |