* [PATCH] HID: remove use of DRIVER_LICENSE
@ 2017-01-05 19:07 Grant Grundler
2017-01-06 8:06 ` Benjamin Tissoires
2017-01-06 13:33 ` Jiri Kosina
0 siblings, 2 replies; 3+ messages in thread
From: Grant Grundler @ 2017-01-05 19:07 UTC (permalink / raw)
To: Jiri Kosina, Benjamin Tissoires
Cc: Dmitry Torokhov, linux-input, linux-kernel, linux-usb,
Grant Grundler
Local "#define DRIVER_LICENSE" obfuscates which license is used
in MODULE_LICENSE(). "fgrep -R MODULE_LICENSE" is more informative
when the string is hard coded in MODULE_LICENSE.
Signed-off-by: Grant Grundler <grundler@google.com>
---
Most of the kernel already uses hard coded strings.
The few places that don't are easy to fix.
drivers/hid/hid-core.c | 3 +--
drivers/hid/usbhid/hid-core.c | 3 +--
drivers/hid/usbhid/usbkbd.c | 3 +--
drivers/hid/usbhid/usbmouse.c | 3 +--
drivers/hid/wacom.h | 1 -
drivers/hid/wacom_sys.c | 2 +-
6 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 08f53c7fd513..996b45dff76d 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -43,7 +43,6 @@
*/
#define DRIVER_DESC "HID core driver"
-#define DRIVER_LICENSE "GPL"
int hid_debug = 0;
module_param_named(debug, hid_debug, int, 0600);
@@ -2848,5 +2847,5 @@ module_exit(hid_exit);
MODULE_AUTHOR("Andreas Gal");
MODULE_AUTHOR("Vojtech Pavlik");
MODULE_AUTHOR("Jiri Kosina");
-MODULE_LICENSE(DRIVER_LICENSE);
+MODULE_LICENSE("GPL");
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index ae83af649a60..1847f64ac7dc 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -43,7 +43,6 @@
*/
#define DRIVER_DESC "USB HID core driver"
-#define DRIVER_LICENSE "GPL"
/*
* Module parameters.
@@ -1660,4 +1659,4 @@ MODULE_AUTHOR("Andreas Gal");
MODULE_AUTHOR("Vojtech Pavlik");
MODULE_AUTHOR("Jiri Kosina");
MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_LICENSE(DRIVER_LICENSE);
+MODULE_LICENSE("GPL");
diff --git a/drivers/hid/usbhid/usbkbd.c b/drivers/hid/usbhid/usbkbd.c
index 9a332e683db7..7fb2d1e4f5dd 100644
--- a/drivers/hid/usbhid/usbkbd.c
+++ b/drivers/hid/usbhid/usbkbd.c
@@ -39,11 +39,10 @@
#define DRIVER_VERSION ""
#define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@ucw.cz>"
#define DRIVER_DESC "USB HID Boot Protocol keyboard driver"
-#define DRIVER_LICENSE "GPL"
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_LICENSE(DRIVER_LICENSE);
+MODULE_LICENSE("GPL");
static const unsigned char usb_kbd_keycode[256] = {
0, 0, 0, 0, 30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38,
diff --git a/drivers/hid/usbhid/usbmouse.c b/drivers/hid/usbhid/usbmouse.c
index bf16d72dc370..dd911c5241d8 100644
--- a/drivers/hid/usbhid/usbmouse.c
+++ b/drivers/hid/usbhid/usbmouse.c
@@ -42,11 +42,10 @@
#define DRIVER_VERSION "v1.6"
#define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@ucw.cz>"
#define DRIVER_DESC "USB HID Boot Protocol mouse driver"
-#define DRIVER_LICENSE "GPL"
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_LICENSE(DRIVER_LICENSE);
+MODULE_LICENSE("GPL");
struct usb_mouse {
char name[128];
diff --git a/drivers/hid/wacom.h b/drivers/hid/wacom.h
index 4681a65a4579..eb24bf823252 100644
--- a/drivers/hid/wacom.h
+++ b/drivers/hid/wacom.h
@@ -100,7 +100,6 @@
#define DRIVER_VERSION "v2.00"
#define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@ucw.cz>"
#define DRIVER_DESC "USB Wacom tablet driver"
-#define DRIVER_LICENSE "GPL"
#define USB_VENDOR_ID_WACOM 0x056a
#define USB_VENDOR_ID_LENOVO 0x17ef
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
index 499cc8213cfe..f79627df9597 100644
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -1959,4 +1959,4 @@ module_hid_driver(wacom_driver);
MODULE_VERSION(DRIVER_VERSION);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_LICENSE(DRIVER_LICENSE);
+MODULE_LICENSE("GPL");
--
2.11.0.390.gc69c2f50cf-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] HID: remove use of DRIVER_LICENSE
2017-01-05 19:07 [PATCH] HID: remove use of DRIVER_LICENSE Grant Grundler
@ 2017-01-06 8:06 ` Benjamin Tissoires
2017-01-06 13:33 ` Jiri Kosina
1 sibling, 0 replies; 3+ messages in thread
From: Benjamin Tissoires @ 2017-01-06 8:06 UTC (permalink / raw)
To: Grant Grundler
Cc: Jiri Kosina, Dmitry Torokhov, linux-input, linux-kernel,
linux-usb, Grant Grundler
On Jan 05 2017 or thereabouts, Grant Grundler wrote:
> Local "#define DRIVER_LICENSE" obfuscates which license is used
> in MODULE_LICENSE(). "fgrep -R MODULE_LICENSE" is more informative
> when the string is hard coded in MODULE_LICENSE.
>
> Signed-off-by: Grant Grundler <grundler@google.com>
> ---
> Most of the kernel already uses hard coded strings.
> The few places that don't are easy to fix.
FWIW:
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] HID: remove use of DRIVER_LICENSE
2017-01-05 19:07 [PATCH] HID: remove use of DRIVER_LICENSE Grant Grundler
2017-01-06 8:06 ` Benjamin Tissoires
@ 2017-01-06 13:33 ` Jiri Kosina
1 sibling, 0 replies; 3+ messages in thread
From: Jiri Kosina @ 2017-01-06 13:33 UTC (permalink / raw)
To: Grant Grundler
Cc: Benjamin Tissoires, Dmitry Torokhov, linux-input, linux-kernel,
linux-usb, Grant Grundler
On Thu, 5 Jan 2017, Grant Grundler wrote:
> Local "#define DRIVER_LICENSE" obfuscates which license is used
> in MODULE_LICENSE(). "fgrep -R MODULE_LICENSE" is more informative
> when the string is hard coded in MODULE_LICENSE.
Applied to hid.git#for-4.11/upstream. Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-06 13:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-05 19:07 [PATCH] HID: remove use of DRIVER_LICENSE Grant Grundler
2017-01-06 8:06 ` Benjamin Tissoires
2017-01-06 13:33 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).