mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] checkpatch: Fix networking kernel-doc block comment defect
       [not found]               ` <1374722064.3436.252.camel@dvhart-mobl1.amr.corp.intel.com>
@ 2013-07-25  3:31                 ` Joe Perches
  0 siblings, 0 replies; only message in thread
From: Joe Perches @ 2013-07-25  3:31 UTC (permalink / raw)
  To: Andrew Morton, Darren Hart; +Cc: David Miller, netdev, LKML, Andy Whitcroft

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.

Reported-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
 scripts/checkpatch.pl | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 23126d4..c18e1be 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2074,6 +2074,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);
-- 
1.8.1.2.459.gbcd45b4.dirty




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-07-25  3:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <b939bb41630693171771c108801c1c5f688ecabc.1374525261.git.dvhart@linux.intel.com>
     [not found] ` <cover.1374525261.git.dvhart@linux.intel.com>
     [not found]   ` <79241b53ec4e638008ba3384958ef9901ad11338.1374525261.git.dvhart@linux.intel.com>
     [not found]     ` <20130724.170008.924195436945641752.davem@davemloft.net>
     [not found]       ` <1374711603.3436.246.camel@dvhart-mobl1.amr.corp.intel.com>
     [not found]         ` <1374712895.1924.13.camel@joe-AO722>
     [not found]           ` <1374721094.3436.249.camel@dvhart-mobl1.amr.corp.intel.com>
     [not found]             ` <1374721731.1924.34.camel@joe-AO722>
     [not found]               ` <1374722064.3436.252.camel@dvhart-mobl1.amr.corp.intel.com>
2013-07-25  3:31                 ` [PATCH] checkpatch: Fix networking kernel-doc block comment defect Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®