linux/drivers/input/keyboard
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
..
Kconfig Input: add D-Link DIR-685 touchkeys driver 2017-06-05 15:35:32 -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
adc-keys.c Input: keyboard - drop calls to platform_set_drvdata and i2c_set_clientdata 2017-01-21 23:51:49 -08:00
adp5520-keys.c Input: keyboard - drop unnecessary calls to input_set_drvdata 2017-01-22 17:22:25 -08:00
adp5588-keys.c gpio: adp5588: move header file out of I2C realm 2017-05-29 13:36:45 +02:00
adp5589-keys.c input: adp5589-keys: use gpiochip data pointer 2016-03-30 10:54:33 +02:00
amikbd.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
atakbd.c Input: atari - enable the 102nd key for German keyboards 2015-01-18 00:10:28 -08:00
atkbd.c Input: iatkbd - constify serio_device_id 2017-08-18 17:14:19 -07:00
bcm-keypad.c Input: matrix-keypad - switch to using generic device properties 2017-01-31 11:31:48 -08:00
bf54x-keys.c Input: keyboard - drop unnecessary calls to input_set_drvdata 2017-01-22 17:22:25 -08:00
cap11xx.c Input: keyboard - drop calls to platform_set_drvdata and i2c_set_clientdata 2017-01-21 23:51:49 -08:00
clps711x-keypad.c input: clps711x-keypad: Changing the compatibility string to match with the smallest supported chip 2016-07-06 17:38:18 +02:00
cros_ec_keyb.c Input: cros_ec_keyb - remove extraneous 'const' 2017-05-11 17:41:01 -07:00
davinci_keyscan.c Input: keyboard - use local variables consistently 2017-01-21 23:51:54 -08:00
dlink-dir685-touchkeys.c Input: add D-Link DIR-685 touchkeys driver 2017-06-05 15:35:32 -07:00
ep93xx_keypad.c input: keyboard: drop owner assignment from platform_drivers 2014-10-20 16:20:39 +02:00
goldfish_events.c Input: goldfish_events - enable ACPI-based enumeration for goldfish events 2016-03-02 09:39:00 -08:00
gpio_keys.c Merge branch 'bind_unbind' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core into next 2017-07-24 16:51:18 -07:00
gpio_keys_polled.c This is the bulk of GPIO changes for the v4.11 cycle 2017-02-23 08:46:04 -08:00
hil_kbd.c Input: hil_kbd - constify serio_device_id 2017-08-18 17:14:20 -07:00
hilkbd.c parisc/input/hilkbd: Fix section mismatches 2017-08-22 16:34:37 +02:00
hpps2atkbd.h
imx_keypad.c Input: imx_keypad - remove obsolete comment 2015-09-05 11:49:33 -07:00
ipaq-micro-keys.c Input: driver for microcontroller keys on the iPaq h3xxx 2015-03-06 11:25:31 -08:00
jornada680_kbd.c Input: keyboard - drop calls to platform_set_drvdata and i2c_set_clientdata 2017-01-21 23:51:49 -08:00
jornada720_kbd.c Input: jornada720_kbd - remove unneeded mach/hardware.h include 2016-09-10 10:47:47 -07:00
lkkbd.c Input: lkkbd - constify serio_device_id 2017-08-18 17:14:21 -07:00
lm8323.c Input: lm8323 - move header file out of I2C realm 2017-05-22 17:23:46 -07:00
lm8333.c Input: drop owner assignment from i2c_driver 2015-07-17 16:57:00 -07:00
locomokbd.c Input: locomokbd - use setup_timer 2017-04-10 20:41:40 -07:00
lpc32xx-keys.c Input: matrix-keypad - switch to using generic device properties 2017-01-31 11:31:48 -08:00
maple_keyb.c Input: keyboard - drop unnecessary calls to input_set_drvdata 2017-01-22 17:22:25 -08:00
matrix_keypad.c Input: matrix_keypad - add option to drive inactive columns 2017-03-29 00:25:01 -07:00
max7359_keypad.c Input: keyboard - drop calls to platform_set_drvdata and i2c_set_clientdata 2017-01-21 23:51:49 -08:00
mcs_touchkey.c Input: mcs - move header file out of I2C realm 2017-05-22 17:26:57 -07:00
mpr121_touchkey.c Input: keyboard - use local variables consistently 2017-01-21 23:51:54 -08:00
newtonkbd.c Input: newtonkbd - constify serio_device_id 2017-08-18 17:14:58 -07:00
nomadik-ske-keypad.c Input: nomadik-ske-keypad - fix a trivial typo 2015-10-22 23:31:22 -07:00
nspire-keypad.c Input: keyboard - drop calls to platform_set_drvdata and i2c_set_clientdata 2017-01-21 23:51:49 -08:00
omap-keypad.c Input: omap-keypad - remove set_col_gpio_val() and get_row_gpio_val() 2016-04-05 10:17:19 -07:00
omap4-keypad.c Input: omap-keypad - fix error handling code 2017-04-10 20:51:49 -07:00
opencores-kbd.c Input: keyboard - drop unnecessary calls to input_set_drvdata 2017-01-22 17:22:25 -08:00
pmic8xxx-keypad.c Input: matrix-keypad - switch to using generic device properties 2017-01-31 11:31:48 -08:00
pxa27x_keypad.c Input: pxa27x_keypad - handle return value of clk_prepare_enable 2017-08-31 11:57:35 -07:00
pxa930_rotary.c input: keyboard: drop owner assignment from platform_drivers 2014-10-20 16:20:39 +02:00
qt1070.c Input: qt1070 - add OF device ID table 2017-03-23 14:46:33 -07:00
qt2160.c Input: drop owner assignment from i2c_driver 2015-07-17 16:57:00 -07:00
samsung-keypad.c Input: keyboard - drop unnecessary calls to device_init_wakeup 2017-01-21 23:53:19 -08:00
sh_keysc.c Input: delete non-required instances of include <linux/init.h> 2014-01-06 23:23:57 -08:00
snvs_pwrkey.c Input: snvs_pwrkey - drop input_free_device call if input_register_device fails 2016-09-26 20:01:59 -07:00
spear-keyboard.c Input: keyboard - drop unnecessary calls to device_init_wakeup 2017-01-21 23:53:19 -08:00
st-keyscan.c Input: matrix-keypad - switch to using generic device properties 2017-01-31 11:31:48 -08:00
stmpe-keypad.c Input: matrix-keypad - switch to using generic device properties 2017-01-31 11:31:48 -08:00
stowaway.c Input: stowaway - constify serio_device_id 2017-08-18 17:15:00 -07:00
sun4i-lradc-keys.c Input: keyboard - drop calls to platform_set_drvdata and i2c_set_clientdata 2017-01-21 23:51:49 -08:00
sunkbd.c Input: sunkbd - constify serio_device_id 2017-08-18 17:15:04 -07:00
tc3589x-keypad.c Input: tc3589x-keypad - remove stray ')' 2016-05-25 17:37:15 -07:00
tca6416-keypad.c Input: use dev_get_platdata() 2013-12-06 02:06:29 -08:00
tca8418_keypad.c Input: tca8418 - enable interrupt after it has been requested 2017-10-19 16:50:20 -07:00
tegra-kbc.c Input: tegra-kbc - handle return value of clk_prepare_enable 2017-08-31 11:57:27 -07:00
tm2-touchkey.c Input: tm2-touchkey - use LEN_ON as boolean value instead of LED_FULL 2017-06-01 22:08:05 -07:00
twl4030_keypad.c mfd: twl: Move header file out of I2C realm 2017-09-04 14:41:02 +01:00
w90p910_keypad.c input: keyboard: drop owner assignment from platform_drivers 2014-10-20 16:20:39 +02:00
xtkbd.c Input: xtkbd - constify serio_device_id 2017-08-18 17:15:07 -07:00