All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Andy Whitcroft <apw@canonical.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
	linux-kernel@vger.kernel.org, Dan Carpenter <error27@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: Checkpatch: False positive
Date: Thu, 16 Jul 2015 08:58:56 -0700	[thread overview]
Message-ID: <1437062336.2495.6.camel@perches.com> (raw)
In-Reply-To: <20150716154341.GJ3681@bark>

On Thu, 2015-07-16 at 16:43 +0100, Andy Whitcroft wrote:
> On Thu, Jul 16, 2015 at 08:35:58AM -0700, Joe Perches wrote:
> > > #31: 
> > >  arch/x86/kernel/hpet.c         | 198 ++++++++++++++++++++++++++---------------
> 
> I guess those are in the limbo land between the end of message and
> beginning of the patch itself.  Perhaps the test should at least stop at
> the end of header marker, at the '---'.
> 
> -apw

Maybe, but the test already stops at signatures like
Signed-off-by: that should always be above the ---.

This might help, but there are _many_ false positives.

The other thing that might help is for people to take
the warnings the script produces less seriously.

Maybe convert:

ERROR -> defect
WARNING -> unstylish
CHECK -> nitpick

or some such

---

 scripts/checkpatch.pl | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index d5ce29a..5e7afa7 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2213,6 +2213,11 @@ sub process {
 			$in_commit_log = 0;
 		}
 
+# Check for patch separator
+		if ($line =~ /^---$/) {
+			$in_commit_log = 0;
+		}
+
 # Check if MAINTAINERS is being updated.  If so, there's probably no need to
 # emit the "does MAINTAINERS need updating?" message on file add/move/delete
 		if ($line =~ /^\s*MAINTAINERS\s*\|/) {



  reply	other threads:[~2015-07-16 15:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-16 10:55 Checkpatch: False positive Viresh Kumar
2015-07-16 15:35 ` Joe Perches
2015-07-16 15:43   ` Andy Whitcroft
2015-07-16 15:58     ` Joe Perches [this message]
2015-07-16 17:21       ` Andy Whitcroft
  -- strict thread matches above, loose matches on Subject: below --
2018-08-20 20:21 Checkpatch " Jeff Kirsher
2018-08-20 20:22 ` Matthew Wilcox
2018-08-20 20:32   ` Jeff Kirsher
     [not found] <54461602.4000705@redhat.com>
2014-10-21  8:28 ` checkpatch false positive Joe Perches
2014-10-21  9:27   ` Hans de Goede
2010-08-11 16:35 Dave Jones
2010-03-17 11:00 Richard Kennedy
2010-03-17 11:53 ` Andy Whitcroft
2010-03-17 15:25 ` Joe Perches
2010-03-17 15:40   ` Richard Kennedy

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=1437062336.2495.6.camel@perches.com \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@canonical.com \
    --cc=error27@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viresh.kumar@linaro.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.