mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] checkpatch: check GIT_COMMIT_ID for a maximum of 3 consecutive lines
@ 2026-08-29  3:16 Wei Yang
  0 siblings, 0 replies; only message in thread
From: Wei Yang @ 2026-08-29  3:16 UTC (permalink / raw)
  To: apw, joe; +Cc: linux-kernel, Wei Yang

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-29  3:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-29  3:16 [PATCH] checkpatch: check GIT_COMMIT_ID for a maximum of 3 consecutive lines Wei Yang

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®