From: Wei Yang <richard.weiyang@gmail.com>
To: apw@canonical.com, joe@perches.com
Cc: linux-kernel@vger.kernel.org, Wei Yang <richard.weiyang@gmail.com>
Subject: [PATCH] checkpatch: check GIT_COMMIT_ID for a maximum of 3 consecutive lines
Date: Sat, 29 Aug 2026 03:16:37 +0000 [thread overview]
Message-ID: <20260829031637.27079-1-richard.weiyang@gmail.com> (raw)
Following commit log would report git commit description style error.
Commit ee040cbd6e48 ("mm/page_alloc: don't warn about large allocations
with __GFP_NOFAIL") remove a warning on allocating large folio with
__GFP_NOFAIL, which was placed there by commit 903edea6c53f ("mm: warn
about illegal __GFP_NOFAIL usage in a more appropriate location and
manner").
Because the second commit description spans 3 lines.
While in commit 4ce9f9704578 ("checkpatch: improve GIT_COMMIT_ID test"), it
says it check commit description "for a maximum of 3 consecutive lines".
Add the missing iteration.
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Cc: Joe Perches <joe@perches.com>
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 2b7a42bbdd94..0d1d0986c0d7 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3431,7 +3431,7 @@ sub process {
my $input = $line;
if ($line =~ /(?:\bcommit\s+[0-9a-f]{5,}|\bcommit\s*$)/i) {
- for (my $n = 0; $n < 2; $n++) {
+ for (my $n = 0; $n < 3; $n++) {
if ($input =~ /\bcommit\s+[0-9a-f]{5,}\s*($balanced_parens)/i) {
$orig_desc = $1;
$has_parens = 1;
--
2.34.1
reply other threads:[~2026-08-29 3:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260829031637.27079-1-richard.weiyang@gmail.com \
--to=richard.weiyang@gmail.com \
--cc=apw@canonical.com \
--cc=joe@perches.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®