From: Joe Perches <joe@perches.com>
To: Brian Norris <computersforpeace@gmail.com>
Cc: Andy Whitcroft <apw@canonical.com>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: checkpatch.pl: false warning about "-p0 patch"
Date: Thu, 22 Aug 2013 14:57:39 -0700 [thread overview]
Message-ID: <1377208659.12003.47.camel@joe-AO722> (raw)
In-Reply-To: <20130822214553.GE14837@ld-irv-0074.broadcom.com>
On Thu, 2013-08-22 at 14:45 -0700, Brian Norris wrote:
> Hello,
Hello.
> I have received what appears to be a false warning from checkpatch.pl when
> checking a patch named 'b':
>
> $ scripts/checkpatch.pl b
> WARNING: patch prefix 'b' exists, appears to be a -p0 patch
>
> total: 0 errors, 1 warnings, 16 lines checked
>
> b has style problems, please review.
>
> If any of these errors are false positives, please report
> them to the maintainer, see CHECKPATCH in MAINTAINERS.
>
> It appears that I can trigger this warning with any arbitrary commit. The
> following bash script gives me at least one warning for everything in Linus'
> tree:
>
> for i in {0..100}
> do
> git format-patch -1 HEAD~$i --stdout > b
> scripts/checkpatch.pl b
> done
>
> I have also seen this warning on patches with other names, but I'm not
> reproducing that right now.
checkpatch can use stdin as well as files/patches.
Try this instead of creating a temporary file:
for i in {0..100}
do
git format-patch -1 --stdout HEAD~$1 | ./scripts/checkpatch.pl -
done
next prev parent reply other threads:[~2013-08-22 21:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-22 21:45 Brian Norris
2013-08-22 21:57 ` Joe Perches [this message]
2013-08-22 22:14 ` Brian Norris
2013-08-22 22:30 ` 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=1377208659.12003.47.camel@joe-AO722 \
--to=joe@perches.com \
--cc=apw@canonical.com \
--cc=computersforpeace@gmail.com \
--cc=linux-kernel@vger.kernel.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 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®