lkml.org 
[lkml]   [2021]   [Dec]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] usb: raw-gadget: upgrade license identifier
From
Date
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@nanos.tec.linutronix.de/

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

\
 
 \ /
  Last update: 2021-12-26 15:02    [W:0.281 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site