From: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
To: linux-kernel@vger.kernel.org
Cc: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>,
kernel@collabora.com, Andy Whitcroft <apw@canonical.com>,
Joe Perches <joe@perches.com>,
Dwaipayan Ray <dwaipayanray1@gmail.com>,
Lukas Bulwahn <lukas.bulwahn@gmail.com>
Subject: [PATCH] checkpatch: warn for p0 patch only if prefix is not b
Date: Mon, 10 Jan 2022 22:05:29 +0200 [thread overview]
Message-ID: <20220110200529.18601-1-dafna.hirschfeld@collabora.com> (raw)
It might be that file 'b' happens to exit. In that
case, if the prefix is also 'b' (which is the
common case) we get the falsely warning:
patch prefix 'b' exists, appears to be a -p0 patch
So warn only if prefix is not 'b'
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 1784921c645d..72263b142e39 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2821,7 +2821,7 @@ sub process {
$in_commit_log = 0;
$p1_prefix = $1;
- if (!$file && $tree && $p1_prefix ne '' &&
+ if (!$file && $tree && $p1_prefix ne '' && $p1_prefix ne 'b' &&
-e "$root/$p1_prefix") {
WARN("PATCH_PREFIX",
"patch prefix '$p1_prefix' exists, appears to be a -p0 patch\n");
--
2.17.1
next reply other threads:[~2022-01-10 20:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-10 20:05 Dafna Hirschfeld [this message]
2022-01-11 10:18 ` Lukas Bulwahn
2022-01-11 10:47 ` Dafna Hirschfeld
2022-01-11 11:27 ` Lukas Bulwahn
2022-01-11 12:06 ` Dafna Hirschfeld
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=20220110200529.18601-1-dafna.hirschfeld@collabora.com \
--to=dafna.hirschfeld@collabora.com \
--cc=apw@canonical.com \
--cc=dwaipayanray1@gmail.com \
--cc=joe@perches.com \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
/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
Powered by JetHome