netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	Darren Hart <dvhart@linux.intel.com>
Cc: David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Andy Whitcroft <apw@canonical.com>
Subject: [PATCH] checkpatch: Fix networking kernel-doc block comment defect
Date: Wed, 24 Jul 2013 20:31:52 -0700	[thread overview]
Message-ID: <1374723112.1924.41.camel@joe-AO722> (raw)
In-Reply-To: <1374722064.3436.252.camel@dvhart-mobl1.amr.corp.intel.com>

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

  reply	other threads:[~2013-07-25  3:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-22 21:41 [PATCH V2 net-next 0/2] pch_gbe: Add MinnowBoard support Darren Hart
2013-07-22 21:41 ` [PATCH net-next 1/2] pch_gbe: Use PCH_GBE_PHY_REGS_LEN instead of 32 Darren Hart
2013-07-22 21:41 ` [PATCH V2 net-next 2/2] pch_gbe: Add MinnowBoard support Darren Hart
2013-07-25  0:00   ` David Miller
2013-07-25  0:20     ` Darren Hart
2013-07-25  0:29       ` David Miller
2013-07-25  0:41       ` Joe Perches
2013-07-25  2:58         ` Darren Hart
2013-07-25  3:08           ` Joe Perches
2013-07-25  3:14             ` Darren Hart
2013-07-25  3:31               ` Joe Perches [this message]
2013-07-25  3:16           ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1374723112.1924.41.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@canonical.com \
    --cc=davem@davemloft.net \
    --cc=dvhart@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --subject='Re: [PATCH] checkpatch: Fix networking kernel-doc block comment defect' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).