Skip to contentSkip to conversation

media: usbvision: remove unneeded DRIVER_LICENSE #define

PATCH In review Greg Kroah-Hartman 4 participants 8 messages Nov 17, 2017 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: usbvision: 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.

Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Johan Hovold <[email protected]>
Cc Davidlohr Bueso <[email protected]>
Cc Sakari Ailus <[email protected]>
---
 drivers/media/usb/usbvision/usbvision-video.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/usb/usbvision/usbvision-video.c +1 -2
index 960272d3c924..0f5954a1fea2 100644
@@ -72,7 +72,6 @@
 #define DRIVER_NAME "usbvision"
 #define DRIVER_ALIAS "USBVision"
 #define DRIVER_DESC "USBVision USB Video Device Driver for Linux"
-#define DRIVER_LICENSE "GPL"
 #define USBVISION_VERSION_STRING "0.9.11"
 
 #define	ENABLE_HEXDUMP	0	/* Enable if you need it */
@@ -141,7 +140,7 @@ MODULE_PARM_DESC(radio_nr, "Set radio device number (/dev/radioX).  Default: -1
 /* Misc stuff */
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_LICENSE(DRIVER_LICENSE);
+MODULE_LICENSE("GPL");
 MODULE_VERSION(USBVISION_VERSION_STRING);
 MODULE_ALIAS(DRIVER_ALIAS);
 
Signature · 1 line
2.15.0
Acked-by on v1 1/1
#1 lore raw
Quoted 7 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.

Quoted 7 lines
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Johan Hovold <[email protected]>
Cc Davidlohr Bueso <[email protected]>
Cc Sakari Ailus <[email protected]>

Thanks!

Hans

Quoted 26 lines
---
 drivers/media/usb/usbvision/usbvision-video.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/usb/usbvision/usbvision-video.c +1 -2
index 960272d3c924..0f5954a1fea2 100644
@@ -72,7 +72,6 @@
 #define DRIVER_NAME "usbvision"
 #define DRIVER_ALIAS "USBVision"
 #define DRIVER_DESC "USBVision USB Video Device Driver for Linux"
-#define DRIVER_LICENSE "GPL"
 #define USBVISION_VERSION_STRING "0.9.11"
 
 #define	ENABLE_HEXDUMP	0	/* Enable if you need it */
@@ -141,7 +140,7 @@ MODULE_PARM_DESC(radio_nr, "Set radio device number (/dev/radioX).  Default: -1
 /* Misc stuff */
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_LICENSE(DRIVER_LICENSE);
+MODULE_LICENSE("GPL");
 MODULE_VERSION(USBVISION_VERSION_STRING);
 MODULE_ALIAS(DRIVER_ALIAS);
 
Reviewed-by on v1 1/1
#2 lore raw
In reply to Greg Kroah-Hartman
Quoted 7 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.

Quoted 7 lines
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Johan Hovold <[email protected]>
Cc Davidlohr Bueso <[email protected]>
Cc Sakari Ailus <[email protected]>
Signature · 2 lines
Cordially
Philippe Ombredanne
#3 lore raw
In reply to Greg Kroah-Hartman

Em Fri, 17 Nov 2017 15:18:26 +0100
Greg Kroah-Hartman <[email protected]> escreveu:

Quoted 31 lines

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.

Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Johan Hovold <[email protected]>
Cc Davidlohr Bueso <[email protected]>
Cc Sakari Ailus <[email protected]>
---
 drivers/media/usb/usbvision/usbvision-video.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/usb/usbvision/usbvision-video.c +0 -1
index 960272d3c924..0f5954a1fea2 100644
@@ -72,7 +72,6 @@
 #define DRIVER_NAME "usbvision"
 #define DRIVER_ALIAS "USBVision"
 #define DRIVER_DESC "USBVision USB Video Device Driver for Linux"
-#define DRIVER_LICENSE "GPL"
 #define USBVISION_VERSION_STRING "0.9.11"
 
 #define	ENABLE_HEXDUMP	0	/* Enable if you need it */

drivers/media/usb/usbvision/usbvision-video.c MODULE_PARM_DESC(radio_nr, "Set radio device number (/dev/radioX). Default: -1 · line 143

Quoted 5 lines
drivers/media/usb/usbvision/usbvision-video.c +1 -1
@@ -141,7 +140,7 @@ MODULE_PARM_DESC(radio_nr, "Set radio device number (/dev/radioX).  Default: -1
 /* Misc stuff */
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_LICENSE(DRIVER_LICENSE);
+MODULE_LICENSE("GPL");

Makes sense to me, but, if we look at the header of this file:

* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.

Its license is actually GPL 2.0+

So, I would actually change it to:

MODULE_LICENSE("GPL v2");

Regard

Thanks,
Mauro

#4 lore raw
Quoted 47 lines · Mauro Carvalho Chehab

Em Fri, 17 Nov 2017 15:18:26 +0100
Greg Kroah-Hartman <[email protected]> escreveu:

Quoted 31 lines

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.

Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Johan Hovold <[email protected]>
Cc Davidlohr Bueso <[email protected]>
Cc Sakari Ailus <[email protected]>
---
 drivers/media/usb/usbvision/usbvision-video.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/usb/usbvision/usbvision-video.c +0 -1
index 960272d3c924..0f5954a1fea2 100644
@@ -72,7 +72,6 @@
 #define DRIVER_NAME "usbvision"
 #define DRIVER_ALIAS "USBVision"
 #define DRIVER_DESC "USBVision USB Video Device Driver for Linux"
-#define DRIVER_LICENSE "GPL"
 #define USBVISION_VERSION_STRING "0.9.11"
 
 #define      ENABLE_HEXDUMP  0       /* Enable if you need it */

drivers/media/usb/usbvision/usbvision-video.c MODULE_PARM_DESC(radio_nr, "Set radio device number (/dev/radioX). Default: -1 · line 143

Quoted 5 lines
drivers/media/usb/usbvision/usbvision-video.c +1 -1
@@ -141,7 +140,7 @@ MODULE_PARM_DESC(radio_nr, "Set radio device number (/dev/radioX).  Default: -1
 /* Misc stuff */
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_LICENSE(DRIVER_LICENSE);
+MODULE_LICENSE("GPL");

Makes sense to me, but, if we look at the header of this file:

* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.

Quoted 5 lines

Its license is actually GPL 2.0+

So, I would actually change it to:

MODULE_LICENSE("GPL v2");

Mauro:

actually even if it sounds weird the module.h doc [1] is clear on this topic:

* "GPL" [GNU Public License v2 or later]
* "GPL v2" [GNU Public License v2]

So it should be "GPL" IMHO.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/module.h?id=refs/tags/v4.10#n175

Signature · 2 lines
Cordially
Philippe Ombredanne
#5 lore raw

Em Fri, 17 Nov 2017 16:01:41 +0100
Philippe Ombredanne <[email protected]> escreveu:

Quoted 12 lines
Quoted 10 lines · Mauro Carvalho Chehab

Em Fri, 17 Nov 2017 15:18:26 +0100
Greg Kroah-Hartman <[email protected]> escreveu:

Quoted 7 lines

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.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Johan Hovold <[email protected]>
Cc Davidlohr Bueso <[email protected]>
Cc Sakari Ailus <[email protected]>
Quoted 40 lines
Quoted 30 lines
Quoted 17 lines
---
 drivers/media/usb/usbvision/usbvision-video.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/usb/usbvision/usbvision-video.c +0 -1
index 960272d3c924..0f5954a1fea2 100644
@@ -72,7 +72,6 @@
 #define DRIVER_NAME "usbvision"
 #define DRIVER_ALIAS "USBVision"
 #define DRIVER_DESC "USBVision USB Video Device Driver for Linux"
-#define DRIVER_LICENSE "GPL"
 #define USBVISION_VERSION_STRING "0.9.11"
 
 #define      ENABLE_HEXDUMP  0       /* Enable if you need it */

drivers/media/usb/usbvision/usbvision-video.c MODULE_PARM_DESC(radio_nr, "Set radio device number (/dev/radioX). Default: -1 · line 143

Quoted 5 lines
drivers/media/usb/usbvision/usbvision-video.c +1 -1
@@ -141,7 +140,7 @@ MODULE_PARM_DESC(radio_nr, "Set radio device number (/dev/radioX).  Default: -1
 /* Misc stuff */
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_LICENSE(DRIVER_LICENSE);
+MODULE_LICENSE("GPL");  

Makes sense to me, but, if we look at the header of this file:

* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.

Quoted 5 lines

Its license is actually GPL 2.0+

So, I would actually change it to:

MODULE_LICENSE("GPL v2");

Mauro:

actually even if it sounds weird the module.h doc [1] is clear on this topic:

Quoted 8 lines

* "GPL" [GNU Public License v2 or later]
* "GPL v2" [GNU Public License v2]

So it should be "GPL" IMHO.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/module.h?id=refs/tags/v4.10#n175

Oh! Yeah, you're right. I would add that on the Kernel documentation somewhere, perhaps with the new document that Thomas is writing about SPFX.

The Documentation/kernel-hacking/hacking.rst doc mentions MODULE_LICENSE, but doesn't define the expected values for it.

Thanks,
Mauro

#6 lore raw
Quoted 74 lines · Mauro Carvalho Chehab

Em Fri, 17 Nov 2017 16:01:41 +0100
Philippe Ombredanne <[email protected]> escreveu:

Quoted 12 lines
Quoted 10 lines · Mauro Carvalho Chehab

Em Fri, 17 Nov 2017 15:18:26 +0100
Greg Kroah-Hartman <[email protected]> escreveu:

Quoted 7 lines

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.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Johan Hovold <[email protected]>
Cc Davidlohr Bueso <[email protected]>
Cc Sakari Ailus <[email protected]>
Quoted 40 lines
Quoted 30 lines
Quoted 17 lines
---
 drivers/media/usb/usbvision/usbvision-video.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/usb/usbvision/usbvision-video.c +0 -1
index 960272d3c924..0f5954a1fea2 100644
@@ -72,7 +72,6 @@
 #define DRIVER_NAME "usbvision"
 #define DRIVER_ALIAS "USBVision"
 #define DRIVER_DESC "USBVision USB Video Device Driver for Linux"
-#define DRIVER_LICENSE "GPL"
 #define USBVISION_VERSION_STRING "0.9.11"
 
 #define      ENABLE_HEXDUMP  0       /* Enable if you need it */

drivers/media/usb/usbvision/usbvision-video.c MODULE_PARM_DESC(radio_nr, "Set radio device number (/dev/radioX). Default: -1 · line 143

Quoted 5 lines
drivers/media/usb/usbvision/usbvision-video.c +1 -1
@@ -141,7 +140,7 @@ MODULE_PARM_DESC(radio_nr, "Set radio device number (/dev/radioX).  Default: -1
 /* Misc stuff */
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_LICENSE(DRIVER_LICENSE);
+MODULE_LICENSE("GPL");  

Makes sense to me, but, if we look at the header of this file:

* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.

Quoted 5 lines

Its license is actually GPL 2.0+

So, I would actually change it to:

MODULE_LICENSE("GPL v2");

Mauro:

actually even if it sounds weird the module.h doc [1] is clear on this topic:

Quoted 8 lines

* "GPL" [GNU Public License v2 or later]
* "GPL v2" [GNU Public License v2]

So it should be "GPL" IMHO.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/module.h?id=refs/tags/v4.10#n175

Quoted 6 lines

Oh! Yeah, you're right. I would add that on the Kernel documentation somewhere, perhaps with the new document that Thomas is writing about SPFX.

The Documentation/kernel-hacking/hacking.rst doc mentions MODULE_LICENSE, but doesn't define the expected values for it.

It's buried in the code comments in include/linux/module.h. One of these days I want to just make a #define for the licenses that makes it a bit more obvious what each should be, but for now, we have lots of other things to clean up before dealing with this :)

thanks,

greg k-h

#7 lore raw
In reply to Mauro Carvalho Chehab
Quoted 47 lines · Mauro Carvalho Chehab

Em Fri, 17 Nov 2017 15:18:26 +0100
Greg Kroah-Hartman <[email protected]> escreveu:

Quoted 31 lines

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.

Cc Hans Verkuil <[email protected]>
Cc Mauro Carvalho Chehab <[email protected]>
Cc Johan Hovold <[email protected]>
Cc Davidlohr Bueso <[email protected]>
Cc Sakari Ailus <[email protected]>
---
 drivers/media/usb/usbvision/usbvision-video.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/usb/usbvision/usbvision-video.c +0 -1
index 960272d3c924..0f5954a1fea2 100644
@@ -72,7 +72,6 @@
 #define DRIVER_NAME "usbvision"
 #define DRIVER_ALIAS "USBVision"
 #define DRIVER_DESC "USBVision USB Video Device Driver for Linux"
-#define DRIVER_LICENSE "GPL"
 #define USBVISION_VERSION_STRING "0.9.11"
 
 #define	ENABLE_HEXDUMP	0	/* Enable if you need it */

drivers/media/usb/usbvision/usbvision-video.c MODULE_PARM_DESC(radio_nr, "Set radio device number (/dev/radioX). Default: -1 · line 143

Quoted 5 lines
drivers/media/usb/usbvision/usbvision-video.c +1 -1
@@ -141,7 +140,7 @@ MODULE_PARM_DESC(radio_nr, "Set radio device number (/dev/radioX).  Default: -1
 /* Misc stuff */
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_LICENSE(DRIVER_LICENSE);
+MODULE_LICENSE("GPL");

Makes sense to me, but, if we look at the header of this file:

* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.

Quoted 5 lines

Its license is actually GPL 2.0+

So, I would actually change it to:

MODULE_LICENSE("GPL v2");

As Philippe points out, the original marking is correct.

Once we get SPDX tags on all of the kernel files, mis-matches, if they are present, will be obvious to check for and fix up. Which is why I have submitted this patch :)

thanks,

greg k-h