2017-11-17 17:56:06

by Philippe Ombredanne

[permalink] [raw]
Subject: Re: [patch 1/7] Documentation: Add license-rules.rst to describe how to properly identify file licenses

On Fri, Nov 17, 2017 at 9:57 AM, Greg Kroah-Hartman
<[email protected]> wrote:
> On Fri, Nov 17, 2017 at 08:37:28AM +0100, Philippe Ombredanne wrote:
>> Or fix the non-standard redefinition of the MODULE_LICENSE macro as
>> DRIVER_LICENSE as in [2] and found elsewhere with
>> grep -r . -e "DRIVER_LICENSE"
>>
>> These break the otherwise nicely grepable MODULE_LICENSE macros
>> with this kind of warty redirection I stumbled upon while reviewing kernel
>> license scans:
>>
>> #define DRIVER_LICENSE "GPL"
>> [...]
>> MODULE_LICENSE(DRIVER_LICENSE);
>
> Yes, those should be cleaned up, there's only 11 instances of them,
> should be simple enough to do. I can knock up a patch series for
> them...

That would be awesome and you are probably a million times faster than
me at that.

There are actually more like 29 locations with such an oddity around AFAIK.

Here is a better, more comprehensive grep:

egrep "MODULE_LICENSE\([^\"]|DRIVER_LICENSE|DRV_LICENSE|MOD_LICENSE"
-r . | egrep -v
"module\.h|nand_ecc\.c|Documentation|scripts|az6007\.c|mt2063.c"

yielding these:

./drivers/ntb/test/ntb_perf.c:#define DRIVER_LICENSE "Dual BSD/GPL"
./drivers/ntb/test/ntb_perf.c:MODULE_LICENSE(DRIVER_LICENSE);
./drivers/ntb/test/ntb_tool.c:#define DRIVER_LICENSE "Dual BSD/GPL"
./drivers/ntb/test/ntb_tool.c:MODULE_LICENSE(DRIVER_LICENSE);
./drivers/ntb/test/ntb_pingpong.c:#define DRIVER_LICENSE "Dual BSD/GPL"
./drivers/ntb/test/ntb_pingpong.c:MODULE_LICENSE(DRIVER_LICENSE);
./drivers/ntb/ntb.c:#define DRIVER_LICENSE "Dual BSD/GPL"
./drivers/ntb/ntb.c:MODULE_LICENSE(DRIVER_LICENSE);
./drivers/input/tablet/hanwang.c:#define DRIVER_LICENSE "GPL"
./drivers/input/tablet/hanwang.c:MODULE_LICENSE(DRIVER_LICENSE);
./drivers/input/tablet/kbtab.c:#define DRIVER_LICENSE "GPL"
./drivers/input/tablet/kbtab.c:MODULE_LICENSE(DRIVER_LICENSE);
./drivers/input/tablet/acecad.c:#define DRIVER_LICENSE "GPL"
./drivers/input/tablet/acecad.c:MODULE_LICENSE(DRIVER_LICENSE);
./drivers/input/misc/keyspan_remote.c:#define DRIVER_LICENSE "GPL"
./drivers/input/misc/keyspan_remote.c:MODULE_LICENSE(DRIVER_LICENSE);
./drivers/gpu/drm/gma500/psb_drv.h:#define DRIVER_LICENSE "GPL"
./drivers/gpu/drm/gma500/psb_drv.c:MODULE_LICENSE(DRIVER_LICENSE);
./drivers/net/usb/hso.c:#define MOD_LICENSE "GPL"
./drivers/net/usb/hso.c:MODULE_LICENSE(MOD_LICENSE);
./drivers/scsi/csiostor/csio_init.c:MODULE_LICENSE(CSIO_DRV_LICENSE);
./drivers/scsi/csiostor/csio_init.h:#define CSIO_DRV_LICENSE "Dual BSD/GPL"
./drivers/media/usb/usbvision/usbvision-video.c:#define DRIVER_LICENSE "GPL"
./drivers/media/usb/usbvision/usbvision-video.c:MODULE_LICENSE(DRIVER_LICENSE);
./drivers/watchdog/pcwd_usb.c:#define DRIVER_LICENSE "GPL"
./drivers/watchdog/pcwd_usb.c:MODULE_LICENSE(DRIVER_LICENSE);
./include/linux/raid/pq.h:#define MODULE_LICENSE(licence)

--
Cordially
Philippe Ombredanne

From 1584330761442588314@xxx Fri Nov 17 16:19:15 +0000 2017
X-GM-THRID: 1583890256805737544
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread