Re: [PATCH] usb: raw-gadget: upgrade license identifier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2021-12-26 at 14:19 +0100, Andrey Konovalov wrote:
> I wonder if checkpatch could alert about considering GPL-2.0+ when
> adding new files.

No. Licensing is up to the author/submitter.

One nit checkpatch could warn about is the use of MODULE_LICENSE("GPL v2")
rather than MODULE_LICENSE("GPL") as that's an unnecessary distinction.

See: https://lore.kernel.org/all/alpine.DEB.2.21.1901282105450.1669@xxxxxxxxxxxxxxxxxxxxxxx/

Given there are a several thousand existing uses of "GPL v2" in the
kernel, do this check only for new patches and not existing files.
---
 scripts/checkpatch.pl | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index b01c36a15d9dd..5b00f1f491aff 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -7418,6 +7418,10 @@ sub process {
 				WARN("MODULE_LICENSE",
 				     "unknown module license " . $extracted_string . "\n" . $herecurr);
 			}
+			if (!$file && $extracted_string eq '"GPL v2"') {
+				WARN("MODULE_LICENSE",
+				     "Prefer \"GPL\" over \"GPL v2\" - see: https://lore.kernel.org/all/alpine.DEB.2.21.1901282105450.1669\@nanos.tec.linutronix.de/\n"; . $herecurr);
+			}
 		}
 
 # check for sysctl duplicate constants





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux