public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: usbvision: remove unneeded DRIVER_LICENSE #define
@ 2017-11-17 14:18 Greg Kroah-Hartman
  2017-11-17 14:32 ` Hans Verkuil
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-17 14:18 UTC (permalink / raw)
  To: Hans Verkuil, Mauro Carvalho Chehab
  Cc: Johan Hovold, Davidlohr Bueso, Sakari Ailus, linux-media,
	linux-kernel, Philippe Ombredanne

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 <hverkuil@xs4all.nl>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Johan Hovold <johan@kernel.org>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Reported-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/media/usb/usbvision/usbvision-video.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c
index 960272d3c924..0f5954a1fea2 100644
--- a/drivers/media/usb/usbvision/usbvision-video.c
+++ b/drivers/media/usb/usbvision/usbvision-video.c
@@ -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);
 
-- 
2.15.0

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

* Re: [PATCH] media: usbvision: remove unneeded DRIVER_LICENSE #define
  2017-11-17 14:18 [PATCH] media: usbvision: remove unneeded DRIVER_LICENSE #define Greg Kroah-Hartman
@ 2017-11-17 14:32 ` Hans Verkuil
  2017-11-17 14:52 ` Philippe Ombredanne
  2017-11-17 14:58 ` Mauro Carvalho Chehab
  2 siblings, 0 replies; 10+ messages in thread
From: Hans Verkuil @ 2017-11-17 14:32 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Mauro Carvalho Chehab
  Cc: Johan Hovold, Davidlohr Bueso, Sakari Ailus, linux-media,
	linux-kernel, Philippe Ombredanne

On 17/11/17 15:18, 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.
> 
> Cc: Hans Verkuil <hverkuil@xs4all.nl>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: Johan Hovold <johan@kernel.org>
> Cc: Davidlohr Bueso <dave@stgolabs.net>
> Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
> Reported-by: Philippe Ombredanne <pombredanne@nexb.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>

Thanks!

	Hans

> ---
>  drivers/media/usb/usbvision/usbvision-video.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c
> index 960272d3c924..0f5954a1fea2 100644
> --- a/drivers/media/usb/usbvision/usbvision-video.c
> +++ b/drivers/media/usb/usbvision/usbvision-video.c
> @@ -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);
>  
> 

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

* Re: [PATCH] media: usbvision: remove unneeded DRIVER_LICENSE #define
  2017-11-17 14:18 [PATCH] media: usbvision: remove unneeded DRIVER_LICENSE #define Greg Kroah-Hartman
  2017-11-17 14:32 ` Hans Verkuil
@ 2017-11-17 14:52 ` Philippe Ombredanne
  2017-11-17 14:58 ` Mauro Carvalho Chehab
  2 siblings, 0 replies; 10+ messages in thread
From: Philippe Ombredanne @ 2017-11-17 14:52 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Hans Verkuil, Mauro Carvalho Chehab, Johan Hovold,
	Davidlohr Bueso, Sakari Ailus, Linux Media Mailing List, LKML

On Fri, Nov 17, 2017 at 3:18 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.
>
> Cc: Hans Verkuil <hverkuil@xs4all.nl>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: Johan Hovold <johan@kernel.org>
> Cc: Davidlohr Bueso <dave@stgolabs.net>
> Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
> 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] 10+ messages in thread

* Re: [PATCH] media: usbvision: remove unneeded DRIVER_LICENSE #define
  2017-11-17 14:18 [PATCH] media: usbvision: remove unneeded DRIVER_LICENSE #define Greg Kroah-Hartman
  2017-11-17 14:32 ` Hans Verkuil
  2017-11-17 14:52 ` Philippe Ombredanne
@ 2017-11-17 14:58 ` Mauro Carvalho Chehab
  2017-11-17 15:01   ` Philippe Ombredanne
  2017-11-17 15:38   ` Greg Kroah-Hartman
  2 siblings, 2 replies; 10+ messages in thread
From: Mauro Carvalho Chehab @ 2017-11-17 14:58 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Hans Verkuil, Mauro Carvalho Chehab, Johan Hovold,
	Davidlohr Bueso, Sakari Ailus, linux-media, linux-kernel,
	Philippe Ombredanne

Em Fri, 17 Nov 2017 15:18:26 +0100
Greg Kroah-Hartman <gregkh@linuxfoundation.org> escreveu:

> 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 <hverkuil@xs4all.nl>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: Johan Hovold <johan@kernel.org>
> Cc: Davidlohr Bueso <dave@stgolabs.net>
> Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
> Reported-by: Philippe Ombredanne <pombredanne@nexb.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>  drivers/media/usb/usbvision/usbvision-video.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c
> index 960272d3c924..0f5954a1fea2 100644
> --- a/drivers/media/usb/usbvision/usbvision-video.c
> +++ b/drivers/media/usb/usbvision/usbvision-video.c
> @@ -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");

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

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

* Re: [PATCH] media: usbvision: remove unneeded DRIVER_LICENSE #define
  2017-11-17 14:58 ` Mauro Carvalho Chehab
@ 2017-11-17 15:01   ` Philippe Ombredanne
  2017-11-17 17:01     ` Mauro Carvalho Chehab
  2017-11-17 15:38   ` Greg Kroah-Hartman
  1 sibling, 1 reply; 10+ messages in thread
From: Philippe Ombredanne @ 2017-11-17 15:01 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Greg Kroah-Hartman, Hans Verkuil, Mauro Carvalho Chehab,
	Johan Hovold, Davidlohr Bueso, Sakari Ailus,
	Linux Media Mailing List, LKML

On Fri, Nov 17, 2017 at 3:58 PM, Mauro Carvalho Chehab
<mchehab@s-opensource.com> wrote:
> Em Fri, 17 Nov 2017 15:18:26 +0100
> Greg Kroah-Hartman <gregkh@linuxfoundation.org> escreveu:
>
>> 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 <hverkuil@xs4all.nl>
>> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
>> Cc: Johan Hovold <johan@kernel.org>
>> Cc: Davidlohr Bueso <dave@stgolabs.net>
>> Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
>> Reported-by: Philippe Ombredanne <pombredanne@nexb.com>
>> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> ---
>>  drivers/media/usb/usbvision/usbvision-video.c | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c
>> index 960272d3c924..0f5954a1fea2 100644
>> --- a/drivers/media/usb/usbvision/usbvision-video.c
>> +++ b/drivers/media/usb/usbvision/usbvision-video.c
>> @@ -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");
>
> 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");

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

-- 
Cordially
Philippe Ombredanne

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

* Re: [PATCH] media: usbvision: remove unneeded DRIVER_LICENSE #define
  2017-11-17 14:58 ` Mauro Carvalho Chehab
  2017-11-17 15:01   ` Philippe Ombredanne
@ 2017-11-17 15:38   ` Greg Kroah-Hartman
  1 sibling, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-17 15:38 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Hans Verkuil, Mauro Carvalho Chehab, Johan Hovold,
	Davidlohr Bueso, Sakari Ailus, linux-media, linux-kernel,
	Philippe Ombredanne

On Fri, Nov 17, 2017 at 12:58:47PM -0200, Mauro Carvalho Chehab wrote:
> Em Fri, 17 Nov 2017 15:18:26 +0100
> Greg Kroah-Hartman <gregkh@linuxfoundation.org> escreveu:
> 
> > 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 <hverkuil@xs4all.nl>
> > Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> > Cc: Johan Hovold <johan@kernel.org>
> > Cc: Davidlohr Bueso <dave@stgolabs.net>
> > Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
> > Reported-by: Philippe Ombredanne <pombredanne@nexb.com>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > ---
> >  drivers/media/usb/usbvision/usbvision-video.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c
> > index 960272d3c924..0f5954a1fea2 100644
> > --- a/drivers/media/usb/usbvision/usbvision-video.c
> > +++ b/drivers/media/usb/usbvision/usbvision-video.c
> > @@ -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");
> 
> 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");

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

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

* Re: [PATCH] media: usbvision: remove unneeded DRIVER_LICENSE #define
  2017-11-17 15:01   ` Philippe Ombredanne
@ 2017-11-17 17:01     ` Mauro Carvalho Chehab
  2017-11-17 17:15       ` Greg Kroah-Hartman
  0 siblings, 1 reply; 10+ messages in thread
From: Mauro Carvalho Chehab @ 2017-11-17 17:01 UTC (permalink / raw)
  To: Philippe Ombredanne
  Cc: Greg Kroah-Hartman, Hans Verkuil, Mauro Carvalho Chehab,
	Johan Hovold, Davidlohr Bueso, Sakari Ailus,
	Linux Media Mailing List, LKML

Em Fri, 17 Nov 2017 16:01:41 +0100
Philippe Ombredanne <pombredanne@nexb.com> escreveu:

> On Fri, Nov 17, 2017 at 3:58 PM, Mauro Carvalho Chehab
> <mchehab@s-opensource.com> wrote:
> > Em Fri, 17 Nov 2017 15:18:26 +0100
> > Greg Kroah-Hartman <gregkh@linuxfoundation.org> escreveu:
> >  
> >> 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 <hverkuil@xs4all.nl>
> >> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> >> Cc: Johan Hovold <johan@kernel.org>
> >> Cc: Davidlohr Bueso <dave@stgolabs.net>
> >> Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
> >> Reported-by: Philippe Ombredanne <pombredanne@nexb.com>
> >> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Acked-by: Mauro Carvalho Chehab <mchehab@kernel.org>

> >> ---
> >>  drivers/media/usb/usbvision/usbvision-video.c | 3 +--
> >>  1 file changed, 1 insertion(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c
> >> index 960272d3c924..0f5954a1fea2 100644
> >> --- a/drivers/media/usb/usbvision/usbvision-video.c
> >> +++ b/drivers/media/usb/usbvision/usbvision-video.c
> >> @@ -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");  
> >
> > 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");  
> 
> 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
> 

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

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

* Re: [PATCH] media: usbvision: remove unneeded DRIVER_LICENSE #define
  2017-11-17 17:01     ` Mauro Carvalho Chehab
@ 2017-11-17 17:15       ` Greg Kroah-Hartman
  0 siblings, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-17 17:15 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Philippe Ombredanne, Hans Verkuil, Mauro Carvalho Chehab,
	Johan Hovold, Davidlohr Bueso, Sakari Ailus,
	Linux Media Mailing List, LKML

On Fri, Nov 17, 2017 at 03:01:02PM -0200, Mauro Carvalho Chehab wrote:
> Em Fri, 17 Nov 2017 16:01:41 +0100
> Philippe Ombredanne <pombredanne@nexb.com> escreveu:
> 
> > On Fri, Nov 17, 2017 at 3:58 PM, Mauro Carvalho Chehab
> > <mchehab@s-opensource.com> wrote:
> > > Em Fri, 17 Nov 2017 15:18:26 +0100
> > > Greg Kroah-Hartman <gregkh@linuxfoundation.org> escreveu:
> > >  
> > >> 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 <hverkuil@xs4all.nl>
> > >> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> > >> Cc: Johan Hovold <johan@kernel.org>
> > >> Cc: Davidlohr Bueso <dave@stgolabs.net>
> > >> Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
> > >> Reported-by: Philippe Ombredanne <pombredanne@nexb.com>
> > >> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 
> Acked-by: Mauro Carvalho Chehab <mchehab@kernel.org>
> 
> > >> ---
> > >>  drivers/media/usb/usbvision/usbvision-video.c | 3 +--
> > >>  1 file changed, 1 insertion(+), 2 deletions(-)
> > >>
> > >> diff --git a/drivers/media/usb/usbvision/usbvision-video.c b/drivers/media/usb/usbvision/usbvision-video.c
> > >> index 960272d3c924..0f5954a1fea2 100644
> > >> --- a/drivers/media/usb/usbvision/usbvision-video.c
> > >> +++ b/drivers/media/usb/usbvision/usbvision-video.c
> > >> @@ -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");  
> > >
> > > 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");  
> > 
> > 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
> > 
> 
> 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

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

* Re: [PATCH] media: usbvision: remove unneeded DRIVER_LICENSE #define
@ 2017-11-17 17:26 Philippe Ombredanne
  2017-11-18 10:29 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 10+ messages in thread
From: Philippe Ombredanne @ 2017-11-17 17:26 UTC (permalink / raw)
  To: Thomas Gleixner, Mauro Carvalho Chehab
  Cc: Greg Kroah-Hartman, Hans Verkuil, Mauro Carvalho Chehab,
	Johan Hovold, Davidlohr Bueso, Sakari Ailus,
	Linux Media Mailing List, LKML

On Fri, Nov 17, 2017 at 6:01 PM, Mauro Carvalho Chehab
<mchehab@s-opensource.com> wrote:
> Em Fri, 17 Nov 2017 16:01:41 +0100
> Philippe Ombredanne <pombredanne@nexb.com> escreveu:
>
>> On Fri, Nov 17, 2017 at 3:58 PM, Mauro Carvalho Chehab
>> <mchehab@s-opensource.com> wrote:
>> > Em Fri, 17 Nov 2017 15:18:26 +0100
>> > Greg Kroah-Hartman <gregkh@linuxfoundation.org> escreveu:
>> >
>> > 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
>>
>
> 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.


Good point!

Thomas:
Is this something that should be taken care of?
If yes, I may be able take a crack at it sometimes next week.

unless...

Mauro:
if you have a docwriter soul and want to make a good deed for the
holidays, may you feel like starting a doc patch? :P

e.g. something along the lines:

"Here are the valid values for MODULE_LICENSE as found in module.h ...
And here are the rules to set a MODULE_LICENSE and how this relates to
the top level SPDX-License-Identifier..."

BTW, I wished we could align the MODULE_LICENSE values with the SPDX
ids for clarity and as this would inject normalized SPDX license tags
in the Elf binaries.

But that 's likely impossible as it would break a truck load of
out-of-tree module macros and out-of-tree module loading command line
tools everywhere (such as busybox and many other) so the (computing)
world would crawl to a halt. *sigh*

-- 
Cordially
Philippe Ombredanne

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

* Re: [PATCH] media: usbvision: remove unneeded DRIVER_LICENSE #define
  2017-11-17 17:26 Philippe Ombredanne
@ 2017-11-18 10:29 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 10+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-18 10:29 UTC (permalink / raw)
  To: Philippe Ombredanne
  Cc: Thomas Gleixner, Mauro Carvalho Chehab, Hans Verkuil,
	Mauro Carvalho Chehab, Johan Hovold, Davidlohr Bueso,
	Sakari Ailus, Linux Media Mailing List, LKML

On Fri, Nov 17, 2017 at 06:26:30PM +0100, Philippe Ombredanne wrote:
> On Fri, Nov 17, 2017 at 6:01 PM, Mauro Carvalho Chehab
> <mchehab@s-opensource.com> wrote:
> > Em Fri, 17 Nov 2017 16:01:41 +0100
> > Philippe Ombredanne <pombredanne@nexb.com> escreveu:
> >
> >> On Fri, Nov 17, 2017 at 3:58 PM, Mauro Carvalho Chehab
> >> <mchehab@s-opensource.com> wrote:
> >> > Em Fri, 17 Nov 2017 15:18:26 +0100
> >> > Greg Kroah-Hartman <gregkh@linuxfoundation.org> escreveu:
> >> >
> >> > 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
> >>
> >
> > 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.
> 
> 
> Good point!
> 
> Thomas:
> Is this something that should be taken care of?
> If yes, I may be able take a crack at it sometimes next week.
> 
> unless...
> 
> Mauro:
> if you have a docwriter soul and want to make a good deed for the
> holidays, may you feel like starting a doc patch? :P
> 
> e.g. something along the lines:
> 
> "Here are the valid values for MODULE_LICENSE as found in module.h ...
> And here are the rules to set a MODULE_LICENSE and how this relates to
> the top level SPDX-License-Identifier..."
> 
> BTW, I wished we could align the MODULE_LICENSE values with the SPDX
> ids for clarity and as this would inject normalized SPDX license tags
> in the Elf binaries.
> 
> But that 's likely impossible as it would break a truck load of
> out-of-tree module macros and out-of-tree module loading command line
> tools everywhere (such as busybox and many other) so the (computing)
> world would crawl to a halt. *sigh*

That's a much longer-term project, let's get the obvious things done
first before worrying about this type of thing :)

thanks,

greg k-h

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

end of thread, other threads:[~2017-11-18 10:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-17 14:18 [PATCH] media: usbvision: remove unneeded DRIVER_LICENSE #define Greg Kroah-Hartman
2017-11-17 14:32 ` Hans Verkuil
2017-11-17 14:52 ` Philippe Ombredanne
2017-11-17 14:58 ` Mauro Carvalho Chehab
2017-11-17 15:01   ` Philippe Ombredanne
2017-11-17 17:01     ` Mauro Carvalho Chehab
2017-11-17 17:15       ` Greg Kroah-Hartman
2017-11-17 15:38   ` Greg Kroah-Hartman
  -- strict thread matches above, loose matches on Subject: below --
2017-11-17 17:26 Philippe Ombredanne
2017-11-18 10:29 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox