diff mbox

gpu: gma500: remove unneeded DRIVER_LICENSE #define

Message ID 20171117141632.GA17880@kroah.com (mailing list archive)
State New, archived
Headers show

Commit Message

Greg Kroah-Hartman Nov. 17, 2017, 2:16 p.m. UTC
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 the string is defined in a .h file
far away from the .c file it is used in.

Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Cc: David Airlie <airlied@linux.ie>
Reported-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpu/drm/gma500/psb_drv.c | 2 +-
 drivers/gpu/drm/gma500/psb_drv.h | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

Comments

Philippe Ombredanne Nov. 17, 2017, 2:50 p.m. UTC | #1
On Fri, Nov 17, 2017 at 3:16 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 the string is defined in a .h file
> far away from the .c file it is used in.
>
> Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
> Cc: David Airlie <airlied@linux.ie>
> Reported-by: Philippe Ombredanne <pombredanne@nexb.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Daniel Vetter Nov. 20, 2017, 10:16 a.m. UTC | #2
On Fri, Nov 17, 2017 at 03:50:25PM +0100, Philippe Ombredanne wrote:
> On Fri, Nov 17, 2017 at 3:16 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 the string is defined in a .h file
> > far away from the .c file it is used in.
> >
> > Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
> > Cc: David Airlie <airlied@linux.ie>
> > Reported-by: Philippe Ombredanne <pombredanne@nexb.com>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 
> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>

Queued for 4.16, it'll pop up in linux-next as soon as -rc1 is tagged.
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
index 37a3be71acd9..8f5cc1f471cd 100644
--- a/drivers/gpu/drm/gma500/psb_drv.c
+++ b/drivers/gpu/drm/gma500/psb_drv.c
@@ -527,4 +527,4 @@  module_exit(psb_exit);
 
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_LICENSE(DRIVER_LICENSE);
+MODULE_LICENSE("GPL");
diff --git a/drivers/gpu/drm/gma500/psb_drv.h b/drivers/gpu/drm/gma500/psb_drv.h
index 821497dbd3fc..4918efc57b7a 100644
--- a/drivers/gpu/drm/gma500/psb_drv.h
+++ b/drivers/gpu/drm/gma500/psb_drv.h
@@ -36,7 +36,6 @@ 
 #include "mmu.h"
 
 #define DRIVER_AUTHOR "Alan Cox <alan@linux.intel.com> and others"
-#define DRIVER_LICENSE "GPL"
 
 #define DRIVER_NAME "gma500"
 #define DRIVER_DESC "DRM driver for the Intel GMA500, GMA600, GMA3600, GMA3650"