Skip to contentSkip to conversation

watchdog: pcwd_usb: remove unneeded DRIVER_LICENSE #define

PATCH In review Greg Kroah-Hartman 3 participants 3 messages Nov 17, 2017 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: pcwd_usb: remove unneeded DRIVER_LICENSE #define

There is no need to #define the license of the driver, just put it in the MODULE_LICENSE() line directly as a text string.

This allows tools that check that the module license matches the source code license to work properly, as there is no need to unwind the unneeded dereference, especially when it is defined just a few lines above from where it is used.

---
 drivers/watchdog/pcwd_usb.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/watchdog/pcwd_usb.c +1 -2
index b9e376c8e2e3..07a97708cb3a 100644
@@ -49,12 +49,11 @@
 #define DRIVER_VERSION "1.02"
 #define DRIVER_AUTHOR "Wim Van Sebroeck <[email protected]>"
 #define DRIVER_DESC "Berkshire USB-PC Watchdog driver"
-#define DRIVER_LICENSE "GPL"
 #define DRIVER_NAME "pcwd_usb"
 
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_LICENSE(DRIVER_LICENSE);
+MODULE_LICENSE("GPL");
 
 #define WATCHDOG_HEARTBEAT 0	/* default heartbeat =
 						delay-time from dip-switches */
Signature · 1 line
2.15.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Greg Kroah-Hartman

There is no need to #define the license of the driver, just put it in the MODULE_LICENSE() line directly as a text string.

This allows tools that check that the module license matches the source code license to work properly, as there is no need to unwind the unneeded dereference, especially when it is defined just a few lines above from where it is used.

Quoted 4 lines
Quoted 23 lines
---
  drivers/watchdog/pcwd_usb.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
drivers/watchdog/pcwd_usb.c +1 -2
index b9e376c8e2e3..07a97708cb3a 100644
@@ -49,12 +49,11 @@
  #define DRIVER_VERSION "1.02"
  #define DRIVER_AUTHOR "Wim Van Sebroeck <[email protected]>"
  #define DRIVER_DESC "Berkshire USB-PC Watchdog driver"
-#define DRIVER_LICENSE "GPL"
  #define DRIVER_NAME "pcwd_usb"
 
  MODULE_AUTHOR(DRIVER_AUTHOR);
  MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_LICENSE(DRIVER_LICENSE);
+MODULE_LICENSE("GPL");
 
  #define WATCHDOG_HEARTBEAT 0	/* default heartbeat =
  						delay-time from dip-switches */
Reviewed-by on v1 1/1
#2 lore raw
In reply to Greg Kroah-Hartman
Quoted 8 lines · Greg Kroah-Hartman

There is no need to #define the license of the driver, just put it in the MODULE_LICENSE() line directly as a text string.

This allows tools that check that the module license matches the source code license to work properly, as there is no need to unwind the unneeded dereference, especially when it is defined just a few lines above from where it is used.

Quoted 4 lines
Signature · 2 lines
Cordially
Philippe Ombredanne