Skip to contentSkip to conversation

checkpatch: add warning for non-lore mailing list URLs

PATCH In review Bjorn Helgaas 3 participants 4 messages Apr 1, 2022 – Apr 2, 2022 Checkpatch

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 checkpatch: add warning for non-lore mailing list URLs

From: Bjorn Helgaas <[email protected]>

The lkml.org, marc.info, spinics.net, etc archives are not quite as useful as lore.kernel.org because they use different styles, add advertising, and may disappear in the future. The lore archives are more consistent and more likely to stick around, so prefer https://lore.kernel.org URLs when they exist.

---

Thanks to Joe for fixing the quoting:
https://lore.kernel.org/all/[email protected]/
Sorry I totally dropped the ball -- I guess I was scared off by fixing the perl quoting and didn't notice that you actually did it for me ;)

Sample commits for testing with "checkpatch -g":

bd82d4bd2188 www.spinics.net/lists/arm-kernel/msg716956.html fdec2a9ef853 www.spinics.net/lists/kvm-arm
1cdca16c043a www.spinics.net/lists/linux-mmc
48ea02184a9d www.spinics.net/lists/linux-pci
f32ae8a5f131 www.spinics.net/lists/netdev
b7dca6dd1e59 lkml.org
265df32eae58 lkml.org/lkml/
4a9ceb7dbadf marc.info/?l=linux-kernel&m=155656897409107&w=2. c03914b7aa31 marc.info/?l=linux-mm
f108c887d089 marc.info/?l=linux-netdev
7424edbb5590 marc.info/?t=156200975600004&r=1&w=2
dabac6e460ce https://marc.info/?l=linux-rdma&m=152296522708522&w=2
b02f6a2ef0a1 www.mail-archive.com/[email protected] 5e91bf5ce9b8 lists.infradead.org/pipermail/linux-snps-arc/2019-May 3cde818cd02b mailman.alsa-project.org/pipermail/alsa-devel/2019-January/144761.html a5448fdc469d http://lists.infradead.org/pipermail/linux-nvme/2019-June/024721.html

---
 scripts/checkpatch.pl | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
scripts/checkpatch.pl +17 -0
index 577e02998701..819e0dece5e9 100755
@@ -698,6 +698,17 @@ sub find_standard_signature {
 	return "";
 }
 
+our $obsolete_archives = qr{(?xi:
+	\Qfreedesktop.org/archives/dri-devel\E |
+	\Qlists.infradead.org\E |
+	\Qlkml.org\E |
+	\Qmail-archive.com\E |
+	\Qmailman.alsa-project.org/pipermail\E |
+	\Qmarc.info\E |
+	\Qozlabs.org/pipermail\E |
+	\Qspinics.net\E
+)};
+
 our @typeListMisordered = (
 	qr{char\s+(?:un)?signed},
 	qr{int\s+(?:(?:un)?signed\s+)?short\s},
@@ -3273,6 +3284,12 @@ sub process {
 			$last_git_commit_id_linenr = $linenr if ($line =~ /\bcommit\s*$/i);
 		}
 
+# Check for mailing list archives other than lore.kernel.org
+		if ($rawline =~ m{\b$obsolete_archives}) {
+			WARN("PREFER_LORE_ARCHIVE",
+			     "Use lore.kernel.org archive links when possible - see https://lore.kernel.org/lists.html\n" . $herecurr);
+		}
+
 # Check for added, moved or deleted files
 		if (!$reported_maintainer_file && !$in_commit_log &&
 		    ($line =~ /^(?:new|deleted) file mode\s*\d+\s*$/ ||
Signature · 1 line
2.25.1
#1 lore raw
Quoted 46 lines · Bjorn Helgaas

From: Bjorn Helgaas <[email protected]>

The lkml.org, marc.info, spinics.net, etc archives are not quite as useful as lore.kernel.org because they use different styles, add advertising, and may disappear in the future. The lore archives are more consistent and more likely to stick around, so prefer https://lore.kernel.org URLs when they exist.

---

Thanks to Joe for fixing the quoting:
https://lore.kernel.org/all/[email protected]/
Sorry I totally dropped the ball -- I guess I was scared off by fixing the perl quoting and didn't notice that you actually did it for me ;)

Sample commits for testing with "checkpatch -g":

bd82d4bd2188 www.spinics.net/lists/arm-kernel/msg716956.html fdec2a9ef853 www.spinics.net/lists/kvm-arm
1cdca16c043a www.spinics.net/lists/linux-mmc
48ea02184a9d www.spinics.net/lists/linux-pci
f32ae8a5f131 www.spinics.net/lists/netdev
b7dca6dd1e59 lkml.org
265df32eae58 lkml.org/lkml/
4a9ceb7dbadf marc.info/?l=linux-kernel&m=155656897409107&w=2. c03914b7aa31 marc.info/?l=linux-mm
f108c887d089 marc.info/?l=linux-netdev
7424edbb5590 marc.info/?t=156200975600004&r=1&w=2
dabac6e460ce https://marc.info/?l=linux-rdma&m=152296522708522&w=2
b02f6a2ef0a1 www.mail-archive.com/[email protected] 5e91bf5ce9b8 lists.infradead.org/pipermail/linux-snps-arc/2019-May 3cde818cd02b mailman.alsa-project.org/pipermail/alsa-devel/2019-January/144761.html a5448fdc469d http://lists.infradead.org/pipermail/linux-nvme/2019-June/024721.html

---
 scripts/checkpatch.pl | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
scripts/checkpatch.pl +0 -0
index 577e02998701..819e0dece5e9 100755
@@ -698,6 +698,17 @@ sub find_standard_signature {
 	return "";
 }
 

scripts/checkpatch.pl sub find_standard_signature { · line 710

Quoted 10 lines
scripts/checkpatch.pl +10 -0
+our $obsolete_archives = qr{(?xi:
+	\Qfreedesktop.org/archives/dri-devel\E |
+	\Qlists.infradead.org\E |
+	\Qlkml.org\E |
+	\Qmail-archive.com\E |
+	\Qmailman.alsa-project.org/pipermail\E |
+	\Qmarc.info\E |
+	\Qozlabs.org/pipermail\E |
+	\Qspinics.net\E
+)};

Hi,

There seem to be some mailing lists from lists.infradead.org that are not (yet?) archived on lore.
Is there a plan to add more list archives from infradead to lore?

thanks.

Quoted 17 lines
scripts/checkpatch.pl +7 -0
+
 our @typeListMisordered = (
 	qr{char\s+(?:un)?signed},
 	qr{int\s+(?:(?:un)?signed\s+)?short\s},
@@ -3273,6 +3284,12 @@ sub process {
 			$last_git_commit_id_linenr = $linenr if ($line =~ /\bcommit\s*$/i);
 		}
 
+# Check for mailing list archives other than lore.kernel.org
+		if ($rawline =~ m{\b$obsolete_archives}) {
+			WARN("PREFER_LORE_ARCHIVE",
+			     "Use lore.kernel.org archive links when possible - see https://lore.kernel.org/lists.html\n" . $herecurr);
+		}
+
 # Check for added, moved or deleted files
 		if (!$reported_maintainer_file && !$in_commit_log &&
 		    ($line =~ /^(?:new|deleted) file mode\s*\d+\s*$/ ||
Signature · 1 line
~Randy
#2 lore raw

[+cc David, Marc for possibly archiving linux-afs on lore]

Quoted 60 lines · Randy Dunlap
Quoted 46 lines · Bjorn Helgaas

From: Bjorn Helgaas <[email protected]>

The lkml.org, marc.info, spinics.net, etc archives are not quite as useful as lore.kernel.org because they use different styles, add advertising, and may disappear in the future. The lore archives are more consistent and more likely to stick around, so prefer https://lore.kernel.org URLs when they exist.

---

Thanks to Joe for fixing the quoting:
https://lore.kernel.org/all/[email protected]/
Sorry I totally dropped the ball -- I guess I was scared off by fixing the perl quoting and didn't notice that you actually did it for me ;)

Sample commits for testing with "checkpatch -g":

bd82d4bd2188 www.spinics.net/lists/arm-kernel/msg716956.html fdec2a9ef853 www.spinics.net/lists/kvm-arm
1cdca16c043a www.spinics.net/lists/linux-mmc
48ea02184a9d www.spinics.net/lists/linux-pci
f32ae8a5f131 www.spinics.net/lists/netdev
b7dca6dd1e59 lkml.org
265df32eae58 lkml.org/lkml/
4a9ceb7dbadf marc.info/?l=linux-kernel&m=155656897409107&w=2. c03914b7aa31 marc.info/?l=linux-mm
f108c887d089 marc.info/?l=linux-netdev
7424edbb5590 marc.info/?t=156200975600004&r=1&w=2
dabac6e460ce https://marc.info/?l=linux-rdma&m=152296522708522&w=2
b02f6a2ef0a1 www.mail-archive.com/[email protected] 5e91bf5ce9b8 lists.infradead.org/pipermail/linux-snps-arc/2019-May 3cde818cd02b mailman.alsa-project.org/pipermail/alsa-devel/2019-January/144761.html a5448fdc469d http://lists.infradead.org/pipermail/linux-nvme/2019-June/024721.html

---
 scripts/checkpatch.pl | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
scripts/checkpatch.pl +0 -0
index 577e02998701..819e0dece5e9 100755
@@ -698,6 +698,17 @@ sub find_standard_signature {
 	return "";
 }
 

scripts/checkpatch.pl sub find_standard_signature { · line 710

Quoted 10 lines
scripts/checkpatch.pl +10 -0
+our $obsolete_archives = qr{(?xi:
+	\Qfreedesktop.org/archives/dri-devel\E |
+	\Qlists.infradead.org\E |
+	\Qlkml.org\E |
+	\Qmail-archive.com\E |
+	\Qmailman.alsa-project.org/pipermail\E |
+	\Qmarc.info\E |
+	\Qozlabs.org/pipermail\E |
+	\Qspinics.net\E
+)};

Hi,

Quoted 3 lines

There seem to be some mailing lists from lists.infradead.org that are not (yet?) archived on lore.
Is there a plan to add more list archives from infradead to lore?

Good question. I don't know how to find out what things are hosted at infradead (it redirects to https://lists.openwrt.org/mailman/listinfo),
but in the linux git history, I found URLs for these lists that are not on lore:

  barebox             1 link from 2014
  kexec               5 links, most recent from 2021
  lede-commits        1 link from 2017
  linux-afs          16 links, most recent 2021
  linux-parport       1 link from 2005
  linux-pcmcia        6 links, most recent 2010
  linux-rpi-kernel    1 link from 2019
  linux-um            1 link from 2020

linux-afs looks like a good candidate for lore. Possibly kexec, too.

linux-rpi-kernel seems like it might be of interest and
https://lists.infradead.org/pipermail/linux-rpi-kernel/ still shows some activity. Unfortunately the only URL I see in the git logs
(http://lists.infradead.org/pipermail/linux-rpi-kernel/2019-March/008615.html)
is already dead.

The following infradead lists appear to be archived on lore already:

ath10k
b43-dev
linux-amlogic
linux-arm-kernel
linux-mediatek
linux-mtd
linux-nvme
linux-riscv
linux-snps-arc

Quoted 20 lines
Quoted 17 lines
scripts/checkpatch.pl +7 -0
+
 our @typeListMisordered = (
 	qr{char\s+(?:un)?signed},
 	qr{int\s+(?:(?:un)?signed\s+)?short\s},
@@ -3273,6 +3284,12 @@ sub process {
 			$last_git_commit_id_linenr = $linenr if ($line =~ /\bcommit\s*$/i);
 		}
 
+# Check for mailing list archives other than lore.kernel.org
+		if ($rawline =~ m{\b$obsolete_archives}) {
+			WARN("PREFER_LORE_ARCHIVE",
+			     "Use lore.kernel.org archive links when possible - see https://lore.kernel.org/lists.html\n" . $herecurr);
+		}
+
 # Check for added, moved or deleted files
 		if (!$reported_maintainer_file && !$in_commit_log &&
 		    ($line =~ /^(?:new|deleted) file mode\s*\d+\s*$/ ||
Signature · 1 line
~Randy
#3 lore raw
Quoted 32 lines · Bjorn Helgaas

[+cc David, Marc for possibly archiving linux-afs on lore]

Quoted 3 lines · Randy Dunlap

There seem to be some mailing lists from lists.infradead.org that are not (yet?) archived on lore.
Is there a plan to add more list archives from infradead to lore?

Good question. I don't know how to find out what things are hosted at infradead (it redirects to https://lists.openwrt.org/mailman/listinfo),
but in the linux git history, I found URLs for these lists that are not on lore:

  barebox             1 link from 2014
  kexec               5 links, most recent from 2021
  lede-commits        1 link from 2017
  linux-afs          16 links, most recent 2021
  linux-parport       1 link from 2005
  linux-pcmcia        6 links, most recent 2010
  linux-rpi-kernel    1 link from 2019
  linux-um            1 link from 2020

linux-afs looks like a good candidate for lore. Possibly kexec, too.

linux-rpi-kernel seems like it might be of interest and
https://lists.infradead.org/pipermail/linux-rpi-kernel/ still shows some activity. Unfortunately the only URL I see in the git logs
(http://lists.infradead.org/pipermail/linux-rpi-kernel/2019-March/008615.html)
is already dead.

The following infradead lists appear to be archived on lore already:

Quoted 9 lines

ath10k
b43-dev
linux-amlogic
linux-arm-kernel
linux-mediatek
linux-mtd
linux-nvme
linux-riscv
linux-snps-arc

FWIW, ath11k list is also archived on lore. Thanks to your suggestion :)

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches