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-01 15:07:57 +01:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 16:26:18 +02:00
|
|
|
#ifndef _FIREWIRE_OHCI_H
|
|
|
|
#define _FIREWIRE_OHCI_H
|
2006-12-20 01:58:35 +01:00
|
|
|
|
|
|
|
/* OHCI register map */
|
|
|
|
|
|
|
|
#define OHCI1394_Version 0x000
|
|
|
|
#define OHCI1394_GUID_ROM 0x004
|
|
|
|
#define OHCI1394_ATRetries 0x008
|
|
|
|
#define OHCI1394_CSRData 0x00C
|
|
|
|
#define OHCI1394_CSRCompareData 0x010
|
|
|
|
#define OHCI1394_CSRControl 0x014
|
|
|
|
#define OHCI1394_ConfigROMhdr 0x018
|
|
|
|
#define OHCI1394_BusID 0x01C
|
|
|
|
#define OHCI1394_BusOptions 0x020
|
|
|
|
#define OHCI1394_GUIDHi 0x024
|
|
|
|
#define OHCI1394_GUIDLo 0x028
|
|
|
|
#define OHCI1394_ConfigROMmap 0x034
|
|
|
|
#define OHCI1394_PostedWriteAddressLo 0x038
|
|
|
|
#define OHCI1394_PostedWriteAddressHi 0x03C
|
|
|
|
#define OHCI1394_VendorID 0x040
|
|
|
|
#define OHCI1394_HCControlSet 0x050
|
|
|
|
#define OHCI1394_HCControlClear 0x054
|
|
|
|
#define OHCI1394_HCControl_BIBimageValid 0x80000000
|
|
|
|
#define OHCI1394_HCControl_noByteSwapData 0x40000000
|
|
|
|
#define OHCI1394_HCControl_programPhyEnable 0x00800000
|
|
|
|
#define OHCI1394_HCControl_aPhyEnhanceEnable 0x00400000
|
|
|
|
#define OHCI1394_HCControl_LPS 0x00080000
|
|
|
|
#define OHCI1394_HCControl_postedWriteEnable 0x00040000
|
|
|
|
#define OHCI1394_HCControl_linkEnable 0x00020000
|
|
|
|
#define OHCI1394_HCControl_softReset 0x00010000
|
|
|
|
#define OHCI1394_SelfIDBuffer 0x064
|
|
|
|
#define OHCI1394_SelfIDCount 0x068
|
2008-03-19 21:40:32 +01:00
|
|
|
#define OHCI1394_SelfIDCount_selfIDError 0x80000000
|
2006-12-20 01:58:35 +01:00
|
|
|
#define OHCI1394_IRMultiChanMaskHiSet 0x070
|
|
|
|
#define OHCI1394_IRMultiChanMaskHiClear 0x074
|
|
|
|
#define OHCI1394_IRMultiChanMaskLoSet 0x078
|
|
|
|
#define OHCI1394_IRMultiChanMaskLoClear 0x07C
|
|
|
|
#define OHCI1394_IntEventSet 0x080
|
|
|
|
#define OHCI1394_IntEventClear 0x084
|
|
|
|
#define OHCI1394_IntMaskSet 0x088
|
|
|
|
#define OHCI1394_IntMaskClear 0x08C
|
|
|
|
#define OHCI1394_IsoXmitIntEventSet 0x090
|
|
|
|
#define OHCI1394_IsoXmitIntEventClear 0x094
|
|
|
|
#define OHCI1394_IsoXmitIntMaskSet 0x098
|
|
|
|
#define OHCI1394_IsoXmitIntMaskClear 0x09C
|
|
|
|
#define OHCI1394_IsoRecvIntEventSet 0x0A0
|
|
|
|
#define OHCI1394_IsoRecvIntEventClear 0x0A4
|
|
|
|
#define OHCI1394_IsoRecvIntMaskSet 0x0A8
|
|
|
|
#define OHCI1394_IsoRecvIntMaskClear 0x0AC
|
|
|
|
#define OHCI1394_InitialBandwidthAvailable 0x0B0
|
|
|
|
#define OHCI1394_InitialChannelsAvailableHi 0x0B4
|
|
|
|
#define OHCI1394_InitialChannelsAvailableLo 0x0B8
|
|
|
|
#define OHCI1394_FairnessControl 0x0DC
|
|
|
|
#define OHCI1394_LinkControlSet 0x0E0
|
|
|
|
#define OHCI1394_LinkControlClear 0x0E4
|
|
|
|
#define OHCI1394_LinkControl_rcvSelfID (1 << 9)
|
|
|
|
#define OHCI1394_LinkControl_rcvPhyPkt (1 << 10)
|
|
|
|
#define OHCI1394_LinkControl_cycleTimerEnable (1 << 20)
|
|
|
|
#define OHCI1394_LinkControl_cycleMaster (1 << 21)
|
|
|
|
#define OHCI1394_LinkControl_cycleSource (1 << 22)
|
|
|
|
#define OHCI1394_NodeID 0x0E8
|
|
|
|
#define OHCI1394_NodeID_idValid 0x80000000
|
2010-06-10 08:36:37 +02:00
|
|
|
#define OHCI1394_NodeID_root 0x40000000
|
2007-08-30 00:11:40 +02:00
|
|
|
#define OHCI1394_NodeID_nodeNumber 0x0000003f
|
|
|
|
#define OHCI1394_NodeID_busNumber 0x0000ffc0
|
2006-12-20 01:58:35 +01:00
|
|
|
#define OHCI1394_PhyControl 0x0EC
|
|
|
|
#define OHCI1394_PhyControl_Read(addr) (((addr) << 8) | 0x00008000)
|
|
|
|
#define OHCI1394_PhyControl_ReadDone 0x80000000
|
|
|
|
#define OHCI1394_PhyControl_ReadData(r) (((r) & 0x00ff0000) >> 16)
|
2007-01-21 20:44:09 +01:00
|
|
|
#define OHCI1394_PhyControl_Write(addr, data) (((addr) << 8) | (data) | 0x00004000)
|
2010-04-04 15:19:54 +02:00
|
|
|
#define OHCI1394_PhyControl_WritePending 0x00004000
|
2006-12-20 01:58:35 +01:00
|
|
|
#define OHCI1394_IsochronousCycleTimer 0x0F0
|
|
|
|
#define OHCI1394_AsReqFilterHiSet 0x100
|
|
|
|
#define OHCI1394_AsReqFilterHiClear 0x104
|
|
|
|
#define OHCI1394_AsReqFilterLoSet 0x108
|
|
|
|
#define OHCI1394_AsReqFilterLoClear 0x10C
|
|
|
|
#define OHCI1394_PhyReqFilterHiSet 0x110
|
|
|
|
#define OHCI1394_PhyReqFilterHiClear 0x114
|
|
|
|
#define OHCI1394_PhyReqFilterLoSet 0x118
|
|
|
|
#define OHCI1394_PhyReqFilterLoClear 0x11C
|
|
|
|
#define OHCI1394_PhyUpperBound 0x120
|
|
|
|
|
|
|
|
#define OHCI1394_AsReqTrContextBase 0x180
|
|
|
|
#define OHCI1394_AsReqTrContextControlSet 0x180
|
|
|
|
#define OHCI1394_AsReqTrContextControlClear 0x184
|
|
|
|
#define OHCI1394_AsReqTrCommandPtr 0x18C
|
|
|
|
|
|
|
|
#define OHCI1394_AsRspTrContextBase 0x1A0
|
|
|
|
#define OHCI1394_AsRspTrContextControlSet 0x1A0
|
|
|
|
#define OHCI1394_AsRspTrContextControlClear 0x1A4
|
|
|
|
#define OHCI1394_AsRspTrCommandPtr 0x1AC
|
|
|
|
|
|
|
|
#define OHCI1394_AsReqRcvContextBase 0x1C0
|
|
|
|
#define OHCI1394_AsReqRcvContextControlSet 0x1C0
|
|
|
|
#define OHCI1394_AsReqRcvContextControlClear 0x1C4
|
|
|
|
#define OHCI1394_AsReqRcvCommandPtr 0x1CC
|
|
|
|
|
|
|
|
#define OHCI1394_AsRspRcvContextBase 0x1E0
|
|
|
|
#define OHCI1394_AsRspRcvContextControlSet 0x1E0
|
|
|
|
#define OHCI1394_AsRspRcvContextControlClear 0x1E4
|
|
|
|
#define OHCI1394_AsRspRcvCommandPtr 0x1EC
|
|
|
|
|
|
|
|
/* Isochronous transmit registers */
|
|
|
|
#define OHCI1394_IsoXmitContextBase(n) (0x200 + 16 * (n))
|
|
|
|
#define OHCI1394_IsoXmitContextControlSet(n) (0x200 + 16 * (n))
|
|
|
|
#define OHCI1394_IsoXmitContextControlClear(n) (0x204 + 16 * (n))
|
|
|
|
#define OHCI1394_IsoXmitCommandPtr(n) (0x20C + 16 * (n))
|
|
|
|
|
|
|
|
/* Isochronous receive registers */
|
2007-02-16 23:34:40 +01:00
|
|
|
#define OHCI1394_IsoRcvContextBase(n) (0x400 + 32 * (n))
|
2006-12-20 01:58:35 +01:00
|
|
|
#define OHCI1394_IsoRcvContextControlSet(n) (0x400 + 32 * (n))
|
|
|
|
#define OHCI1394_IsoRcvContextControlClear(n) (0x404 + 32 * (n))
|
|
|
|
#define OHCI1394_IsoRcvCommandPtr(n) (0x40C + 32 * (n))
|
|
|
|
#define OHCI1394_IsoRcvContextMatch(n) (0x410 + 32 * (n))
|
|
|
|
|
|
|
|
/* Interrupts Mask/Events */
|
2007-01-21 20:44:09 +01:00
|
|
|
#define OHCI1394_reqTxComplete 0x00000001
|
|
|
|
#define OHCI1394_respTxComplete 0x00000002
|
|
|
|
#define OHCI1394_ARRQ 0x00000004
|
|
|
|
#define OHCI1394_ARRS 0x00000008
|
|
|
|
#define OHCI1394_RQPkt 0x00000010
|
|
|
|
#define OHCI1394_RSPkt 0x00000020
|
|
|
|
#define OHCI1394_isochTx 0x00000040
|
|
|
|
#define OHCI1394_isochRx 0x00000080
|
|
|
|
#define OHCI1394_postedWriteErr 0x00000100
|
|
|
|
#define OHCI1394_lockRespErr 0x00000200
|
|
|
|
#define OHCI1394_selfIDComplete 0x00010000
|
|
|
|
#define OHCI1394_busReset 0x00020000
|
2008-04-03 23:18:23 +02:00
|
|
|
#define OHCI1394_regAccessFail 0x00040000
|
2007-01-21 20:44:09 +01:00
|
|
|
#define OHCI1394_phy 0x00080000
|
|
|
|
#define OHCI1394_cycleSynch 0x00100000
|
|
|
|
#define OHCI1394_cycle64Seconds 0x00200000
|
|
|
|
#define OHCI1394_cycleLost 0x00400000
|
|
|
|
#define OHCI1394_cycleInconsistent 0x00800000
|
|
|
|
#define OHCI1394_unrecoverableError 0x01000000
|
|
|
|
#define OHCI1394_cycleTooLong 0x02000000
|
|
|
|
#define OHCI1394_phyRegRcvd 0x04000000
|
|
|
|
#define OHCI1394_masterIntEnable 0x80000000
|
2006-12-20 01:58:35 +01:00
|
|
|
|
|
|
|
#define OHCI1394_evt_no_status 0x0
|
|
|
|
#define OHCI1394_evt_long_packet 0x2
|
|
|
|
#define OHCI1394_evt_missing_ack 0x3
|
|
|
|
#define OHCI1394_evt_underrun 0x4
|
|
|
|
#define OHCI1394_evt_overrun 0x5
|
|
|
|
#define OHCI1394_evt_descriptor_read 0x6
|
|
|
|
#define OHCI1394_evt_data_read 0x7
|
|
|
|
#define OHCI1394_evt_data_write 0x8
|
|
|
|
#define OHCI1394_evt_bus_reset 0x9
|
|
|
|
#define OHCI1394_evt_timeout 0xa
|
|
|
|
#define OHCI1394_evt_tcode_err 0xb
|
|
|
|
#define OHCI1394_evt_reserved_b 0xc
|
|
|
|
#define OHCI1394_evt_reserved_c 0xd
|
|
|
|
#define OHCI1394_evt_unknown 0xe
|
|
|
|
#define OHCI1394_evt_flushed 0xf
|
|
|
|
|
|
|
|
#define OHCI1394_phy_tcode 0xe
|
|
|
|
|
firewire: reorganize header files
The three header files of firewire-core, i.e.
"drivers/firewire/fw-device.h",
"drivers/firewire/fw-topology.h",
"drivers/firewire/fw-transaction.h",
are replaced by
"drivers/firewire/core.h",
"include/linux/firewire.h".
The latter includes everything which a firewire high-level driver (like
firewire-sbp2) needs besides linux/firewire-constants.h, while core.h
contains the rest which is needed by firewire-core itself and by low-
level drivers (card drivers) like firewire-ohci.
High-level drivers can now also reside outside of drivers/firewire
without having to add drivers/firewire to the header file search path in
makefiles. At least the firedtv driver will be such a driver.
I also considered to spread the contents of core.h over several files,
one for each .c file where the respective implementation resides. But
it turned out that most core .c files will end up including most of the
core .h files. Also, the combined core.h isn't unreasonably big, and it
will lose more of its contents to linux/firewire.h anyway soon when more
firewire drivers are added. (IP-over-1394, firedtv, and there are plans
for one or two more.)
Furthermore, fw-ohci.h is renamed to ohci.h. The name of core.h and
ohci.h is chosen with regard to name changes of the .c files in a
follow-up change.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-06-05 16:26:18 +02:00
|
|
|
#endif /* _FIREWIRE_OHCI_H */
|