mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
checkpatch: prefer MODULE_LICENSE("GPL") over MODULE_LICENSE("GPL v2")
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 bf7fbeeae6 ("module: Cure the MODULE_LICENSE "GPL" vs. "GPL v2" bogosity")
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Joe Perches <[email protected]>
Cc: Dwaipayan Ray <[email protected]>
Cc: Lukas Bulwahn <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
1 parent
2699e5143c
commit
6e8f42dc9c
1 file changed
+7
@@ -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
|
||||
|
||||
Reference in new issue
Block a user