The patch titled Subject: checkpatch: don't print the next line if not defined has been added to the -mm mm-nonmm-unstable branch. Its filename is checkpatch-dont-print-the-next-line-if-not-defined.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/checkpatch-dont-print-the-next-line-if-not-defined.patch This patch will later appear in the mm-nonmm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Matthieu Baerts <matthieu.baerts@xxxxxxxxxxxx> Subject: checkpatch: don't print the next line if not defined Date: Mon, 03 Apr 2023 18:23:47 +0200 When checking if "Reported-by" tag is followed by "Link:", there is no need to print the next line if there is no next line. While at it, also mention in this case that the "Link:" tag should be followed by a URL, similar to the next warning. By doing that, the code is now similar to what is done above when checking if the Co-developed-by tag is properly used. Link: https://lkml.kernel.org/r/20230314-doc-checkpatch-closes-tag-v4-2-d26d1fa66f9f@xxxxxxxxxxxx Fixes: d7f1d71e5ef6 ("checkpatch: warn when Reported-by: is not followed by Link:") Signed-off-by: Matthieu Baerts <matthieu.baerts@xxxxxxxxxxxx> Acked-by: Joe Perches <joe@xxxxxxxxxxx> Cc: Andy Whitcroft <apw@xxxxxxxxxxxxx> Cc: Bagas Sanjaya <bagasdotme@xxxxxxxxx> Cc: Daniel Vetter <daniel@xxxxxxxx> Cc: David Airlie <airlied@xxxxxxxxx> Cc: Dwaipayan Ray <dwaipayanray1@xxxxxxxxx> Cc: Jonathan Corbet <corbet@xxxxxxx> Cc: Kai Wasserbäch <kai@xxxxxxxxxxxxxxxxxxxxxx> Cc: Konstantin Ryabitsev <konstantin@xxxxxxxxxxxxxxxxxxx> Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Cc: Lukas Bulwahn <lukas.bulwahn@xxxxxxxxx> Cc: Thorsten Leemhuis <linux@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/scripts/checkpatch.pl~checkpatch-dont-print-the-next-line-if-not-defined +++ a/scripts/checkpatch.pl @@ -3162,7 +3162,7 @@ sub process { 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"); + "Reported-by: should be immediately followed by Link: with a URL to the report\n" . $herecurr . "\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"); _ Patches currently in -mm which might be from matthieu.baerts@xxxxxxxxxxxx are docs-process-allow-closes-tags-with-links.patch checkpatch-dont-print-the-next-line-if-not-defined.patch checkpatch-use-a-list-of-link-tags.patch checkpatch-allow-closes-tags-with-links.patch checkpatch-check-for-misuse-of-the-link-tags.patch