[Linux-kernel-mentees] [PATCH] Script: Checkpatch: Disables commit log length check in case of valid signature tags

Nachiket Naganure nachiketun8 at gmail.com
Sun Jul 26 07:58:02 UTC 2020

Checkpatch.pl outputs warnings for commit description lines that exceed
beyond 75 characters. Sometimes these lines might contain signature tags
that cannot be shortened. The patch checks if the line has any valid
signature tags and disables the warning in such a case.

For instance in commit ID ac854131d984, the patch
contains a Reported by tag line which exceeds 75 chars. And there is no
valid way to shorten the length.

To fix this, we need to check if the $line variable has any valid
signature tags which are already stored in $signature_tags variable.

Signed-off-by: Nachiket Naganure <nachiketun8 at gmail.com>
 scripts/checkpatch.pl | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 197436b20288..b6d5e2a8fce8 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2806,6 +2806,8 @@ sub process {
 					# filename then :
 		      $line =~ /^\s*(?:Fixes:|Link:)/i ||
 					# A Fixes: or Link: line
+          $line =~ /$signature_tags/ ||
+          # Checks for signature_tags
 		      $commit_log_possible_stack_dump)) {
 			     "Possible unwrapped commit description (prefer a maximum 75 chars per line)\n" . $herecurr);

More information about the Linux-kernel-mentees mailing list