Skip to contentSkip to conversation

checkpatch-warn-when-reported-by-is-not-followed-by-link.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Feb 3, 2023

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: checkpatch: warn when Reported-by: is not followed by Link:
has been removed from the -mm tree. Its filename was
checkpatch-warn-when-reported-by-is-not-followed-by-link.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Kai Wasserbäch <[email protected]>
Subject: checkpatch: warn when Reported-by: is not followed by Link:
Date: Fri, 20 Jan 2023 13:35:19 +0100

Encourage patch authors to link to reports by issuing a warning, if a
Reported-by: is not accompanied by a link to the report. Those links are often extremely useful for any code archaeologist that wants to know more about the backstory of a change than the commit message provides. That includes maintainers higher up in the patch-flow hierarchy, which is why Linus asks developers to add such links [1, 2, 3]. To quote [1]:

Quoted 10 lines

Again, the commit has a link to the patch *submission*, which is almost entirely useless. There's no link to the actual problem the patch fixes.

[...]

Put another way: I can see that

Quoted 7 lines

in the commit, but I don't have a clue what the actual report was, and there really isn't enough information in the commit itself, except for a fairly handwavy "Device drivers might, for instance, still need to flush operations.."

I don't want to know what device drivers _might_ do. I would want to have an actual pointer to what they do and where.

Another reason why these links are wanted: the ongoing regression tracking efforts can only scale with them, as they allow the regression tracking bot 'regzbot' to automatically connect tracked reports with patches that are posted or committed to fix tracked regressions.

---

scripts/checkpatch.pl renamed from scripts/checkpatch.pl~checkpatch-warn-when-reported-by-is-not-followed-by-link +12 -0
@@ -3157,8 +3157,20 @@ sub process {
 					     "Co-developed-by and Signed-off-by: name/email do not match \n" . "$here\n" . $rawline . "\n" .$rawlines[$linenr]);
 				}
 			}
+
+# check if Reported-by: is followed by a Link:
+			if ($sign_off =~ /^reported(?:|-and-tested)-by:$/i) {
+				if (!defined $lines[$linenr]) {
+					WARN("BAD_REPORTED_BY_LINK",
+					     "Reported-by: should be immediately followed by Link: to the report\n" . $herecurr . $rawlines[$linenr] . "\n");
+				} elsif ($rawlines[$linenr] !~ m{^link:\s*https?://}i) {
+					WARN("BAD_REPORTED_BY_LINK",
+					     "Reported-by: should be immediately followed by Link: with a URL to the report\n" . $herecurr . $rawlines[$linenr] . "\n");
+				}
+			}
 		}
 
+
 # Check Fixes: styles is correct
 		if (!$in_header_lines &&
 		    $line =~ /^\s*fixes:?\s*(?:commit\s*)?[0-9a-f]{5,}\b/i) {

_

Patches currently in -mm which might be from [email protected] are