From: Petr Machata <petrm@nvidia.com>
To: Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>
Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>,
Lukas Bulwahn <lukas.bulwahn@gmail.com>,
<linux-kernel@vger.kernel.org>, Andy Roulin <aroulin@nvidia.com>,
Petr Machata <petrm@nvidia.com>
Subject: [PATCH] checkpatch: Tolerate upstream commit references
Date: Tue, 17 Dec 2024 14:34:30 +0100 [thread overview]
Message-ID: <20241217133430.342797-1-petrm@nvidia.com> (raw)
Two forms of upstream commit references are used (and documented) for
stable kernels:
- [ Upstream commit <sha1> ]
- commit <sha1> upstream.
These are useful apart from stable kernel trees to other downstream
maintainers that wish to keep track of what came from where. But
checkpatch gives citations on patches annotated this way.
Extend checkpatch to tolerate the documented upstream references. This
reduces noise for downstream maintainers.
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Andy Roulin <aroulin@nvidia.com>
---
scripts/checkpatch.pl | 2 ++
1 file changed, 2 insertions(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 9eed3683ad76..a6c81b38e413 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3340,6 +3340,8 @@ sub process {
if ($perl_version_ok &&
$in_commit_log && !$commit_log_possible_stack_dump &&
$line !~ /^\s*(?:Link|Patchwork|http|https|BugLink|base-commit):/i &&
+ $line !~ /^\s*\[ Upstream commit [0-9a-f]{40} ]/ &&
+ $line !~ /^\s*commit [0-9a-f]{40}\s*upstream\./ &&
$line !~ /^This reverts commit [0-9a-f]{7,40}/ &&
(($line =~ /\bcommit\s+[0-9a-f]{5,}\b/i ||
($line =~ /\bcommit\s*$/i && defined($rawlines[$linenr]) && $rawlines[$linenr] =~ /^\s*[0-9a-f]{5,}\b/i)) ||
--
2.47.0
next reply other threads:[~2024-12-17 13:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 13:34 Petr Machata [this message]
2025-01-07 11:55 ` Petr Machata
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=20241217133430.342797-1-petrm@nvidia.com \
--to=petrm@nvidia.com \
--cc=apw@canonical.com \
--cc=aroulin@nvidia.com \
--cc=dwaipayanray1@gmail.com \
--cc=joe@perches.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