2017-11-17 20:34:07

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH] 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.

Cc: Wim Van Sebroeck <[email protected]>
Cc: Guenter Roeck <[email protected]>
Reported-by: Philippe Ombredanne <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
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 <[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 */
--
2.15.0


From 1584342488995390214@xxx Fri Nov 17 19:25:40 +0000 2017
X-GM-THRID: 1584342152804577130
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread


2017-11-17 19:25:40

by Philippe Ombredanne

[permalink] [raw]
Subject: Re: [PATCH] watchdog: pcwd_usb: remove unneeded DRIVER_LICENSE #define

On Fri, Nov 17, 2017 at 3:22 PM, Greg Kroah-Hartman
<[email protected]> 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 <[email protected]>
> Cc: Guenter Roeck <[email protected]>
> Reported-by: Philippe Ombredanne <[email protected]>
> Signed-off-by: Greg Kroah-Hartman <[email protected]>


Reviewed-by: Philippe Ombredanne <[email protected]>
--
Cordially
Philippe Ombredanne

From 1584342152804577130@xxx Fri Nov 17 19:20:19 +0000 2017
X-GM-THRID: 1584342152804577130
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread

2017-11-17 19:20:19

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH] watchdog: pcwd_usb: remove unneeded DRIVER_LICENSE #define

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 <[email protected]>
> Cc: Guenter Roeck <[email protected]>
> Reported-by: Philippe Ombredanne <[email protected]>
> Signed-off-by: Greg Kroah-Hartman <[email protected]>

Reviewed-by: Guenter Roeck <[email protected]>

> ---
> 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 <[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 */
>


From 1584345444235132434@xxx Fri Nov 17 20:12:38 +0000 2017
X-GM-THRID: 1584345444235132434
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread