checkpatch: check GIT_COMMIT_ID for a maximum of 3 consecutive lines
PATCH 1/1 checkpatch: check GIT_COMMIT_ID for a maximum of 3 consecutive lines
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 <[email protected]>
Cc Joe Perches <[email protected]>
--- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/checkpatch.pl +1 -1
@@ -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;
Signature · 1 line
2.34.1