kernel_optimize_test/drivers/usb/host
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
..
whci USB: whci-hcd: constify hc_driver structures 2017-07-30 07:26:52 -07:00
bcma-hcd.c
ehci-atmel.c
ehci-dbg.c usb: add CONFIG_USB_PCI for system have both PCI HW and non-PCI based USB HW 2017-03-17 13:16:56 +09:00
ehci-exynos.c usb: host: ehci-exynos: Handle return value of clk_prepare_enable 2017-06-13 10:48:24 +02:00
ehci-fsl.c usb: host: make ehci_fsl_overrides const and __initconst 2017-08-31 18:08:46 +02:00
ehci-fsl.h
ehci-grlib.c
ehci-hcd.c usb: host: Remove remaining pci_pool in comments 2017-03-16 18:03:31 +09:00
ehci-hub.c
ehci-mem.c usb: ehci: use bus->sysdev for DMA configuration 2017-03-23 08:20:21 +01:00
ehci-msm.c
ehci-mv.c
ehci-mxc.c
ehci-omap.c usb: ehci-omap: fix error return code in ehci_hcd_omap_probe() 2017-08-10 11:36:50 -07:00
ehci-orion.c usb: orion-ehci: Add support for the Armada 3700 2017-03-17 13:32:59 +09:00
ehci-pci.c
ehci-platform.c USB: ehci-platform: fix companion-device leak 2017-05-17 11:52:44 +02:00
ehci-pmcmsp.c
ehci-ppc-of.c
ehci-ps3.c
ehci-q.c
ehci-sched.c usb: host: remove unnecessary null check 2017-05-17 12:20:53 +02:00
ehci-sh.c
ehci-spear.c
ehci-st.c
ehci-sysfs.c
ehci-tegra.c
ehci-tilegx.c
ehci-timer.c usb: Make use of ktime_* comparison functions 2017-06-03 18:08:04 +09:00
ehci-w90x900.c
ehci-xilinx-of.c
ehci.h
fhci-dbg.c
fhci-hcd.c
fhci-hub.c
fhci-mem.c
fhci-q.c
fhci-sched.c
fhci-tds.c
fhci.h
fotg210-hcd.c usb: Make use of ktime_* comparison functions 2017-06-03 18:08:04 +09:00
fotg210.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
fsl-mph-dr-of.c usb: Convert to using %pOF instead of full_name 2017-07-22 15:56:53 +02:00
hwa-hc.c usb: hwa-hc: constify usb_device_id 2017-08-10 11:31:26 -07:00
imx21-dbg.c
imx21-hcd.c usb: imx21-hcd: make imx21_hc_driver const 2017-08-31 18:08:46 +02:00
imx21-hcd.h
isp116x-hcd.c isp116x-hcd: constify hc_driver structures 2017-07-30 07:26:52 -07:00
isp116x.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
isp1362-hcd.c isp1362-hcd: constify hc_driver structures 2017-07-30 07:26:51 -07:00
isp1362.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig usb: host: ohci-omap3: Remove driver in favor of ohci-platform 2017-06-03 18:08:05 +09:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
max3421-hcd.c usb: host: max3421-hcd: constify hc_driver structures 2017-07-30 07:26:51 -07:00
ohci-at91.c usb: ohci-at91: Do not drop unhandled USB suspend control requests 2017-03-09 10:22:08 +01:00
ohci-da8xx.c
ohci-dbg.c
ohci-exynos.c usb: host: ohci-exynos: Decrese node refcount on exynos_ehci_get_phy() error paths 2017-01-10 17:00:42 +01:00
ohci-hcd.c ohci-pci: add qemu quirk 2017-03-23 08:13:21 +01:00
ohci-hub.c ohci-hub: fix typo in dbg_port macro 2017-02-10 12:20:57 +01:00
ohci-mem.c
ohci-nxp.c
ohci-omap.c mfd: tps65010: Move header file out of I2C realm 2017-08-15 08:27:22 +01:00
ohci-pci.c ohci-pci: add qemu quirk 2017-03-23 08:13:21 +01:00
ohci-platform.c usb: host: ohci-platform: Add support for omap3 and later 2017-06-03 18:08:04 +09:00
ohci-ppc-of.c
ohci-ps3.c
ohci-pxa27x.c usb: host: ohci-pxa27x: Handle return value of clk_prepare_enable 2017-06-29 14:49:06 +02:00
ohci-q.c
ohci-s3c2410.c
ohci-sa1111.c
ohci-sm501.c dma-coherent: remove the DMA_MEMORY_MAP and DMA_MEMORY_IO flags 2017-09-01 11:59:17 +02:00
ohci-spear.c
ohci-st.c
ohci-tilegx.c
ohci-tmio.c dma-coherent: remove the DMA_MEMORY_MAP and DMA_MEMORY_IO flags 2017-09-01 11:59:17 +02:00
ohci.h ohci-pci: add qemu quirk 2017-03-23 08:13:21 +01:00
oxu210hp-hcd.c usb: host: Remove remaining pci_pool in comments 2017-03-16 18:03:31 +09:00
oxu210hp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci-quirks.c xhci: Fix sleeping with spin_lock_irq() held in ASmedia 1042A workaround 2017-09-18 17:10:41 +02:00
pci-quirks.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
r8a66597-hcd.c usb: r8a66597-hcd: constify hc_driver structures 2017-07-30 07:26:51 -07:00
r8a66597.h
sl811_cs.c
sl811-hcd.c usb: host/sl811-hcd: constify hc_driver structures 2017-07-30 07:26:51 -07:00
sl811.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ssb-hcd.c
u132-hcd.c usb: host: u132-hcd: constify hc_driver structures 2017-07-30 07:26:52 -07:00
uhci-debug.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
uhci-grlib.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
uhci-hcd.c usb/uhci: Add support for Aspeed BMC SoCs 2017-05-25 14:30:13 +02:00
uhci-hcd.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
uhci-hub.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
uhci-pci.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
uhci-platform.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
uhci-q.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xhci-dbg.c usb: xhci: remove xhci_dbg_ctx() 2017-04-08 12:17:42 +02:00
xhci-ext-caps.h usb: host: xhci: remove unneded semicolon 2017-01-25 10:59:06 +01:00
xhci-hub.c usb: xhci: Handle error condition in xhci_stop_device() 2017-10-17 10:38:13 +02:00
xhci-mem.c Merge 4.12-rc6 into usb-next 2017-06-20 10:16:07 +08:00
xhci-mtk-sch.c
xhci-mtk.c usb: xhci-mtk: add generic compatible string 2017-08-31 18:08:46 +02:00
xhci-mtk.h usb: xhci-mtk: add reference clock 2017-01-19 10:37:16 +01:00
xhci-mvebu.c
xhci-mvebu.h
xhci-pci.c Revert "xhci: Limit USB2 port wake support for AMD Promontory hosts" 2017-09-18 17:10:41 +02:00
xhci-plat.c usb: host: xhci-plat: allow sysdev to inherit from ACPI 2017-09-18 17:10:41 +02:00
xhci-plat.h usb: host: xhci-plat: add resume_quirk() 2017-04-19 19:59:17 +02:00
xhci-rcar.c usb: host: xhci: rcar: Add support for R-Car H3 ES2.0 2017-08-16 15:26:26 -07:00
xhci-rcar.h usb: host: xhci-plat: set resume_quirk() for R-Car controllers 2017-04-19 19:59:17 +02:00
xhci-ring.c usb: xhci: Reset halted endpoint if trb is noop 2017-10-17 10:38:13 +02:00
xhci-tegra.c usb: xhci: remove dummy extra_priv_size for size of xhci_hcd struct 2017-03-09 18:00:39 +01:00
xhci-trace.c
xhci-trace.h xhci: add port status tracing 2017-08-16 15:26:26 -07:00
xhci.c xhci: Identify USB 3.1 capable hosts by their port protocol capability 2017-10-17 10:38:12 +02:00
xhci.h Revert "xhci: Limit USB2 port wake support for AMD Promontory hosts" 2017-09-18 17:10:41 +02:00