linux/drivers/input/misc
Greg Kroah-Hartman b24413180f License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.

By default all files without license information are under the default
license of the kernel, which is GPL version 2.

Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier.  The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.

This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.

How this work was done:

Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
 - file had no licensing information it it.
 - file was a */uapi/* one with no licensing information in it,
 - file was a */uapi/* one with existing licensing information,

Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.

The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne.  Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.

The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed.  Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.

Criteria used to select files for SPDX license identifier tagging was:
 - Files considered eligible had to be source code files.
 - Make and config files were included as candidates if they contained >5
   lines of source
 - File already had some variant of a license header in it (even if <5
   lines).

All documentation files were explicitly excluded.

The following heuristics were used to determine which SPDX license
identifiers to apply.

 - when both scanners couldn't find any license traces, file was
   considered to have no license information in it, and the top level
   COPYING file license applied.

   For non */uapi/* files that summary was:

   SPDX license identifier                            # files
   ---------------------------------------------------|-------
   GPL-2.0                                              11139

   and resulted in the first patch in this series.

   If that file was a */uapi/* path one, it was "GPL-2.0 WITH
   Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:

   SPDX license identifier                            # files
   ---------------------------------------------------|-------
   GPL-2.0 WITH Linux-syscall-note                        930

   and resulted in the second patch in this series.

 - if a file had some form of licensing information in it, and was one
   of the */uapi/* ones, it was denoted with the Linux-syscall-note if
   any GPL family license was found in the file or had no licensing in
   it (per prior point).  Results summary:

   SPDX license identifier                            # files
   ---------------------------------------------------|------
   GPL-2.0 WITH Linux-syscall-note                       270
   GPL-2.0+ WITH Linux-syscall-note                      169
   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
   LGPL-2.1+ WITH Linux-syscall-note                      15
   GPL-1.0+ WITH Linux-syscall-note                       14
   ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
   LGPL-2.0+ WITH Linux-syscall-note                       4
   LGPL-2.1 WITH Linux-syscall-note                        3
   ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
   ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1

   and that resulted in the third patch in this series.

 - when the two scanners agreed on the detected license(s), that became
   the concluded license(s).

 - when there was disagreement between the two scanners (one detected a
   license but the other didn't, or they both detected different
   licenses) a manual inspection of the file occurred.

 - In most cases a manual inspection of the information in the file
   resulted in a clear resolution of the license that should apply (and
   which scanner probably needed to revisit its heuristics).

 - When it was not immediately clear, the license identifier was
   confirmed with lawyers working with the Linux Foundation.

 - If there was any question as to the appropriate license identifier,
   the file was flagged for further research and to be revisited later
   in time.

In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.

Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights.  The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.

Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.

In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.

Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
 - a full scancode scan run, collecting the matched texts, detected
   license ids and scores
 - reviewing anything where there was a license detected (about 500+
   files) to ensure that the applied SPDX license was correct
 - reviewing anything where there was no detection but the patch license
   was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
   SPDX license was correct

This produced a worksheet with 20 files needing minor correction.  This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.

These .csv files were then reviewed by Greg.  Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected.  This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.)  Finally Greg ran the script using the .csv files to
generate the patches.

Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-02 11:10:55 +01:00
..
88pm80x_onkey.c Input: misc - drop unnecessary calls to device_init_wakeup 2017-01-21 23:53:21 -08:00
88pm860x_onkey.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2014-12-17 10:06:02 -08:00
Kconfig Input: add a driver for PWM controllable vibrators 2017-09-04 12:13:24 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ab8500-ponkey.c Input: ab8500-ponkey - drop unnecessary call to platform_set_drvdata 2017-01-18 11:49:19 -08:00
ad714x-i2c.c Input: ad714x - convert to using managed resources 2015-09-19 11:42:39 -07:00
ad714x-spi.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2015-11-06 11:57:41 -08:00
ad714x.c Input: ad714x - convert to using managed resources 2015-09-19 11:42:39 -07:00
ad714x.h Input: ad714x - convert to using managed resources 2015-09-19 11:42:39 -07:00
adxl34x-i2c.c Input: adxl34x - make it enumerable in ACPI environment 2017-01-03 12:33:12 -08:00
adxl34x-spi.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
adxl34x.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
adxl34x.h Input: adxl34 - make enable/disable separate from suspend/resume 2010-07-03 13:13:21 -07:00
apanel.c Input: convert remaining uses of pr_warning to pr_warn 2017-03-17 17:25:02 -07:00
arizona-haptics.c Linux 4.10-rc5 2017-01-24 12:37:43 -08:00
ati_remote2.c Input: ati_remote2 - constify usb_device_id 2017-08-14 22:12:06 -07:00
atlas_btns.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
atmel_captouch.c Input: misc - drop calls to platform_set_drvdata and i2c_set_clientdata 2017-01-21 23:51:51 -08:00
axp20x-pek.c Input: axp20x-pek - fix module not auto-loading for axp221 pek 2017-10-19 16:50:28 -07:00
bfin_rotary.c Input: bfin_rotary - switch to using devm_add_action_or_reset() 2017-01-18 11:49:11 -08:00
bma150.c Input: bma150 - remove support for bma150 2017-04-01 11:44:53 -07:00
cm109.c Input: cm109 - validate number of endpoints before using them 2017-03-16 13:56:50 -07:00
cma3000_d0x.c Input: use dev_get_platdata() 2013-12-06 02:06:29 -08:00
cma3000_d0x.h Input: add CMA3000 accelerometer driver 2010-11-30 23:05:21 -08:00
cma3000_d0x_i2c.c Input: drop owner assignment from i2c_driver 2015-07-17 16:57:00 -07:00
cobalt_btns.c input: misc: drop owner assignment from platform_drivers 2014-10-20 16:20:40 +02:00
cpcap-pwrbutton.c input: cpcap-pwrbutton: New driver 2017-04-11 15:18:09 +01:00
da9052_onkey.c input: misc: drop owner assignment from platform_drivers 2014-10-20 16:20:40 +02:00
da9055_onkey.c input: misc: drop owner assignment from platform_drivers 2014-10-20 16:20:40 +02:00
da9063_onkey.c Input: misc - drop calls to platform_set_drvdata and i2c_set_clientdata 2017-01-21 23:51:51 -08:00
dm355evm_keys.c mfd: dm355evm_msp: Move header file out of I2C realm 2017-08-15 08:06:14 +01:00
drv260x.c Input: drv260x - remove OF dependency 2017-03-09 10:00:14 -08:00
drv2665.c Input: drv2665 - fix misuse of regmap_update_bits 2016-11-30 09:03:44 -08:00
drv2667.c Input: drv2667 - fix misuse of regmap_update_bits 2016-11-30 09:03:45 -08:00
e3x0-button.c Input: misc - drop empty remove functions 2017-01-21 23:53:34 -08:00
gp2ap002a00f.c Input: misc - drop unnecessary calls to device_init_wakeup 2017-01-21 23:53:21 -08:00
gpio-beeper.c Input: improve usage of gpiod API 2015-06-16 17:09:14 -07:00
gpio_decoder.c Input: gpio_decoder - drop unnecessary call to platform_set_drvdata 2017-01-18 11:49:13 -08:00
gpio_tilt_polled.c Input: misc - use local variables consistently 2017-01-21 23:51:56 -08:00
hisi_powerkey.c Input: misc - drop empty remove functions 2017-01-21 23:53:34 -08:00
hp_sdc_rtc.c Input: hp_sdc_rtc - fix y2038 problem in proc_show 2015-10-22 23:31:28 -07:00
ideapad_slidebar.c input: misc: drop owner assignment from platform_drivers 2014-10-20 16:20:40 +02:00
ims-pcu.c Input: ims-psu - check if CDC union descriptor is sane 2017-10-19 17:20:06 -07:00
ixp4xx-beeper.c input: misc: drop owner assignment from platform_drivers 2014-10-20 16:20:40 +02:00
keyspan_remote.c Input: keyspan_remote - constify usb_device_id 2017-08-07 20:10:17 -07:00
kxtj9.c Input: kxtj9 - remove unneeded retval variable 2015-10-02 11:44:17 -07:00
m68kspkr.c input: misc: drop owner assignment from platform_drivers 2014-10-20 16:20:40 +02:00
max8925_onkey.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2014-12-17 10:06:02 -08:00
max8997_haptic.c pwm: Changes for v4.7-rc1 2016-05-25 10:40:15 -07:00
max77693-haptic.c Linux 4.8 2016-10-13 17:25:40 -07:00
mc13783-pwrbutton.c input: misc: drop owner assignment from platform_drivers 2014-10-20 16:20:40 +02:00
mma8450.c Input: mma8450 - drop unnecessary call to i2c_set_clientdata 2017-01-18 11:49:14 -08:00
palmas-pwrbutton.c Input: constify of_device_id arrays 2015-03-19 12:16:18 -07:00
pcap_keys.c input: misc: drop owner assignment from platform_drivers 2014-10-20 16:20:40 +02:00
pcf8574_keypad.c Input: drop owner assignment from i2c_driver 2015-07-17 16:57:00 -07:00
pcf50633-input.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
pcspkr.c Input: pcspkr - fix code style and error value in pcspkr_event 2017-08-14 22:12:05 -07:00
pm8xxx-vibrator.c Input: pm8xxx-vib - add support for pm8916's vibrator 2017-04-05 08:52:39 -07:00
pm8941-pwrkey.c Input: misc - drop unnecessary calls to device_init_wakeup 2017-01-21 23:53:21 -08:00
pmic8xxx-pwrkey.c Input: misc - drop empty remove functions 2017-01-21 23:53:34 -08:00
powermate.c Input: powermate - constify usb_device_id and fix space before '[' error 2017-08-07 20:10:18 -07:00
pwm-beeper.c Input: pwm-beeper - support customized freq for SND_BELL 2017-03-07 10:39:23 -08:00
pwm-vibra.c Input: add a driver for PWM controllable vibrators 2017-09-04 12:13:24 -07:00
rb532_button.c MIPS: Remove all the uses of custom gpio.h 2015-09-03 12:08:02 +02:00
regulator-haptic.c Input: regulator-haptic - fix spelling mistake: "dveice" -> "device" 2016-06-23 10:43:57 -07:00
retu-pwrbutton.c Input: misc - drop empty remove functions 2017-01-21 23:53:34 -08:00
rk805-pwrkey.c Input: add power key driver for Rockchip RK805 PMIC 2017-07-24 17:00:55 -07:00
rotary_encoder.c Input: rotary_encoder - support binary encoding of states 2016-07-27 18:26:10 -07:00
sgi_btns.c input: misc: drop owner assignment from platform_drivers 2014-10-20 16:20:40 +02:00
sirfsoc-onkey.c Input: misc - drop empty remove functions 2017-01-21 23:53:34 -08:00
soc_button_array.c Input: soc_button_array - silence -ENOENT error on Dell XPS13 9365 2017-08-20 09:30:23 -07:00
sparcspkr.c Input: sparcspkr - use platform_register/unregister_drivers() 2015-12-02 10:02:50 -08:00
tps65218-pwrbutton.c Linux 4.10-rc5 2017-01-24 12:37:43 -08:00
twl4030-pwrbutton.c mfd: twl: Move header file out of I2C realm 2017-09-04 14:41:02 +01:00
twl4030-vibra.c mfd: twl: Move header file out of I2C realm 2017-09-04 14:41:02 +01:00
twl6040-vibra.c Merge branch 'next' into for-linus 2016-05-16 17:25:08 -07:00
uinput.c Input: uinput - avoid crash when sending FF request to device going away 2017-09-21 16:31:23 -07:00
wistron_btns.c Input: wistron_btns - remove use of sparse_keymap_free 2017-03-09 10:06:12 -08:00
wm831x-on.c Input: wm831x-on - pass the IRQF_ONESHOT flag 2015-05-15 15:58:42 -07:00
xen-kbdfront.c Input: xen-kbdfront - enable auto repeat for xen keyboard frontend driver 2017-08-28 10:31:31 -07:00
yealink.c Input: yealink - constify attribute_group structures 2017-07-12 14:18:30 -07:00
yealink.h Input: yealink - define packet offset __be16 instead of u16 2017-04-10 20:41:41 -07:00