[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220110200529.18601-1-dafna.hirschfeld@collabora.com>
Date: Mon, 10 Jan 2022 22:05:29 +0200
From: Dafna Hirschfeld <dafna.hirschfeld@...labora.com>
To: linux-kernel@...r.kernel.org
Cc: Dafna Hirschfeld <dafna.hirschfeld@...labora.com>,
kernel@...labora.com, Andy Whitcroft <apw@...onical.com>,
Joe Perches <joe@...ches.com>,
Dwaipayan Ray <dwaipayanray1@...il.com>,
Lukas Bulwahn <lukas.bulwahn@...il.com>
Subject: [PATCH] checkpatch: warn for p0 patch only if prefix is not b
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@...labora.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
Powered by blists - more mailing lists