summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-08-08 12:57:01 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2013-08-08 12:57:01 +1000
commit20aa4af6f3902a728bf78ff5e97ee565beb6e9a4 (patch)
tree37e43df2daceb6019d582aa385b1f3eecd4e1475 /scripts
parent83968240f3ffcd7cc7a1b0d64ad026bd6a5e3d5f (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>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl1
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 {
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);