All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] watchdog: pcwd_usb: remove unneeded DRIVER_LICENSE #define
@ 2017-11-17 14:22 Greg Kroah-Hartman
  2017-11-17 14:31 ` Guenter Roeck
  2017-11-17 14:54 ` Philippe Ombredanne
  0 siblings, 2 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-17 14:22 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck
  Cc: linux-kernel, Philippe Ombredanne, linux-watchdog

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.

Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Guenter Roeck <linux@roeck-us.net>
Reported-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/watchdog/pcwd_usb.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/watchdog/pcwd_usb.c b/drivers/watchdog/pcwd_usb.c
index b9e376c8e2e3..07a97708cb3a 100644
--- a/drivers/watchdog/pcwd_usb.c
+++ b/drivers/watchdog/pcwd_usb.c
@@ -49,12 +49,11 @@
 #define DRIVER_VERSION "1.02"
 #define DRIVER_AUTHOR "Wim Van Sebroeck <wim@iguana.be>"
 #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 */
-- 
2.15.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] watchdog: pcwd_usb: remove unneeded DRIVER_LICENSE #define
  2017-11-17 14:22 [PATCH] watchdog: pcwd_usb: remove unneeded DRIVER_LICENSE #define Greg Kroah-Hartman
@ 2017-11-17 14:31 ` Guenter Roeck
  2017-11-17 14:54 ` Philippe Ombredanne
  1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2017-11-17 14:31 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Wim Van Sebroeck
  Cc: linux-kernel, Philippe Ombredanne, linux-watchdog

On 11/17/2017 06:22 AM, Greg Kroah-Hartman wrote:
> 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.
> 
> Cc: Wim Van Sebroeck <wim@iguana.be>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Reported-by: Philippe Ombredanne <pombredanne@nexb.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>   drivers/watchdog/pcwd_usb.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/watchdog/pcwd_usb.c b/drivers/watchdog/pcwd_usb.c
> index b9e376c8e2e3..07a97708cb3a 100644
> --- a/drivers/watchdog/pcwd_usb.c
> +++ b/drivers/watchdog/pcwd_usb.c
> @@ -49,12 +49,11 @@
>   #define DRIVER_VERSION "1.02"
>   #define DRIVER_AUTHOR "Wim Van Sebroeck <wim@iguana.be>"
>   #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 */
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] watchdog: pcwd_usb: remove unneeded DRIVER_LICENSE #define
  2017-11-17 14:22 [PATCH] watchdog: pcwd_usb: remove unneeded DRIVER_LICENSE #define Greg Kroah-Hartman
  2017-11-17 14:31 ` Guenter Roeck
@ 2017-11-17 14:54 ` Philippe Ombredanne
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Ombredanne @ 2017-11-17 14:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Wim Van Sebroeck, Guenter Roeck, LKML, linux-watchdog

On Fri, Nov 17, 2017 at 3:22 PM, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> 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.
>
> Cc: Wim Van Sebroeck <wim@iguana.be>
> Cc: Guenter Roeck <linux@roeck-us.net>
> Reported-by: Philippe Ombredanne <pombredanne@nexb.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
-- 
Cordially
Philippe Ombredanne

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-17 14:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-17 14:22 [PATCH] watchdog: pcwd_usb: remove unneeded DRIVER_LICENSE #define Greg Kroah-Hartman
2017-11-17 14:31 ` Guenter Roeck
2017-11-17 14:54 ` Philippe Ombredanne

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.