* [PATCH 1/2] checkpatch: Prefer MODULE_LICENSE("GPL") over MODULE_LICENSE("GPL v2")
@ 2022-01-28 18:59 Joe Perches
0 siblings, 0 replies; only message in thread
From: Joe Perches @ 2022-01-28 18:59 UTC (permalink / raw)
To: Andrew Morton, Andy Whitcroft, Dwaipayan Ray, Lukas Bulwahn; +Cc: linux-kernel
There is no effective difference.
Given the large number of uses of "GPL v2", emit this message only for
patches as a trivial treeside sed could be done one day.
Ref: commit bf7fbeeae6db ("module: Cure the MODULE_LICENSE "GPL" vs. "GPL v2" bogosity")
Signed-off-by: Joe Perches <joe@perches.com>
---
scripts/checkpatch.pl | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index b01c36a15d9dd..b7c181ea0ac56 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -7418,6 +7418,13 @@ sub process {
WARN("MODULE_LICENSE",
"unknown module license " . $extracted_string . "\n" . $herecurr);
}
+ if (!$file && $extracted_string eq '"GPL v2"') {
+ if (WARN("MODULE_LICENSE",
+ "Prefer \"GPL\" over \"GPL v2\" - see commit bf7fbeeae6db (\"module: Cure the MODULE_LICENSE \"GPL\" vs. \"GPL v2\" bogosity\")\n" . $herecurr) &&
+ $fix) {
+ $fixed[$fixlinenr] =~ s/\bMODULE_LICENSE\s*\(\s*"GPL v2"\s*\)/MODULE_LICENSE("GPL")/;
+ }
+ }
}
# check for sysctl duplicate constants
--
2.30.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-28 18:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-28 18:59 [PATCH 1/2] checkpatch: Prefer MODULE_LICENSE("GPL") over MODULE_LICENSE("GPL v2") Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®