diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-01 15:07:57 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-02 11:10:55 +0100 |
commit | b24413180f5600bcb3bb70fbed5cf186b60864bd (patch) | |
tree | 4ebcae0dab27ee8bfcecb9a5daf65353c6dd7ed6 /tools/build | |
parent | bb176f67090ca54869fc1262c913aa69d2ede070 (diff) | |
download | op-kernel-dev-b24413180f5600bcb3bb70fbed5cf186b60864bd.zip op-kernel-dev-b24413180f5600bcb3bb70fbed5cf186b60864bd.tar.gz |
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>
Diffstat (limited to 'tools/build')
63 files changed, 63 insertions, 0 deletions
diff --git a/tools/build/Makefile b/tools/build/Makefile index 477f00e..5eb4b5a 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 ifeq ($(srctree),) srctree := $(patsubst %/,%,$(dir $(CURDIR))) srctree := $(patsubst %/,%,$(dir $(srctree))) diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build index c46b20e..cd72016 100644 --- a/tools/build/Makefile.build +++ b/tools/build/Makefile.build @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 ### # Main build makefile. # diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile index ee2546d..9698264 100644 --- a/tools/build/feature/Makefile +++ b/tools/build/feature/Makefile @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 FILES= \ test-all.bin \ test-backtrace.bin \ diff --git a/tools/build/feature/test-all.c b/tools/build/feature/test-all.c index b5cfc64..4112702 100644 --- a/tools/build/feature/test-all.c +++ b/tools/build/feature/test-all.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * test-all.c: Try to build all the main testcases at once. * diff --git a/tools/build/feature/test-backtrace.c b/tools/build/feature/test-backtrace.c index 7124aa1..e9ddd27 100644 --- a/tools/build/feature/test-backtrace.c +++ b/tools/build/feature/test-backtrace.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <execinfo.h> #include <stdio.h> diff --git a/tools/build/feature/test-bionic.c b/tools/build/feature/test-bionic.c index eac24e9..4bcc977 100644 --- a/tools/build/feature/test-bionic.c +++ b/tools/build/feature/test-bionic.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <android/api-level.h> int main(void) diff --git a/tools/build/feature/test-bpf.c b/tools/build/feature/test-bpf.c index da2172f..82070ea 100644 --- a/tools/build/feature/test-bpf.c +++ b/tools/build/feature/test-bpf.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <asm/unistd.h> #include <linux/bpf.h> #include <unistd.h> diff --git a/tools/build/feature/test-clang.cpp b/tools/build/feature/test-clang.cpp index e23c1b1..a2b3f09 100644 --- a/tools/build/feature/test-clang.cpp +++ b/tools/build/feature/test-clang.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include "clang/Basic/VirtualFileSystem.h" #include "clang/Driver/Driver.h" #include "clang/Frontend/TextDiagnosticPrinter.h" diff --git a/tools/build/feature/test-compile.c b/tools/build/feature/test-compile.c index c54e655..9821b827 100644 --- a/tools/build/feature/test-compile.c +++ b/tools/build/feature/test-compile.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> int main(void) { diff --git a/tools/build/feature/test-cplus-demangle.c b/tools/build/feature/test-cplus-demangle.c index 610c686..2ba5647 100644 --- a/tools/build/feature/test-cplus-demangle.c +++ b/tools/build/feature/test-cplus-demangle.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 extern int printf(const char *format, ...); extern char *cplus_demangle(const char *, int); diff --git a/tools/build/feature/test-cxx.cpp b/tools/build/feature/test-cxx.cpp index b1dee9a..396aaed 100644 --- a/tools/build/feature/test-cxx.cpp +++ b/tools/build/feature/test-cxx.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <iostream> #include <memory> diff --git a/tools/build/feature/test-dwarf.c b/tools/build/feature/test-dwarf.c index 3fc1801..8d474bd 100644 --- a/tools/build/feature/test-dwarf.c +++ b/tools/build/feature/test-dwarf.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <dwarf.h> #include <elfutils/libdw.h> #include <elfutils/version.h> diff --git a/tools/build/feature/test-dwarf_getlocations.c b/tools/build/feature/test-dwarf_getlocations.c index 7016269..78fb4a1 100644 --- a/tools/build/feature/test-dwarf_getlocations.c +++ b/tools/build/feature/test-dwarf_getlocations.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdlib.h> #include <elfutils/libdw.h> diff --git a/tools/build/feature/test-get_cpuid.c b/tools/build/feature/test-get_cpuid.c index d7a2c40..bb4f065 100644 --- a/tools/build/feature/test-get_cpuid.c +++ b/tools/build/feature/test-get_cpuid.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <cpuid.h> int main(void) diff --git a/tools/build/feature/test-glibc.c b/tools/build/feature/test-glibc.c index 9367f758..9ab8e90 100644 --- a/tools/build/feature/test-glibc.c +++ b/tools/build/feature/test-glibc.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdlib.h> #if !defined(__UCLIBC__) diff --git a/tools/build/feature/test-gtk2-infobar.c b/tools/build/feature/test-gtk2-infobar.c index 397b464..b1b716d 100644 --- a/tools/build/feature/test-gtk2-infobar.c +++ b/tools/build/feature/test-gtk2-infobar.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #pragma GCC diagnostic ignored "-Wstrict-prototypes" #include <gtk/gtk.h> #pragma GCC diagnostic error "-Wstrict-prototypes" diff --git a/tools/build/feature/test-gtk2.c b/tools/build/feature/test-gtk2.c index 6bd80e5..2aaf4bf 100644 --- a/tools/build/feature/test-gtk2.c +++ b/tools/build/feature/test-gtk2.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #pragma GCC diagnostic ignored "-Wstrict-prototypes" #include <gtk/gtk.h> #pragma GCC diagnostic error "-Wstrict-prototypes" diff --git a/tools/build/feature/test-jvmti.c b/tools/build/feature/test-jvmti.c index 1c665f0..5cf3119 100644 --- a/tools/build/feature/test-jvmti.c +++ b/tools/build/feature/test-jvmti.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <jvmti.h> #include <jvmticmlr.h> diff --git a/tools/build/feature/test-libaudit.c b/tools/build/feature/test-libaudit.c index afc019f..f5b0863 100644 --- a/tools/build/feature/test-libaudit.c +++ b/tools/build/feature/test-libaudit.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <libaudit.h> extern int printf(const char *format, ...); diff --git a/tools/build/feature/test-libbabeltrace.c b/tools/build/feature/test-libbabeltrace.c index 9cf802a..10bb69d 100644 --- a/tools/build/feature/test-libbabeltrace.c +++ b/tools/build/feature/test-libbabeltrace.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <babeltrace/ctf-writer/writer.h> #include <babeltrace/ctf-ir/stream-class.h> diff --git a/tools/build/feature/test-libbfd.c b/tools/build/feature/test-libbfd.c index 2405990..afa46b0 100644 --- a/tools/build/feature/test-libbfd.c +++ b/tools/build/feature/test-libbfd.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <bfd.h> extern int printf(const char *format, ...); diff --git a/tools/build/feature/test-libcrypto.c b/tools/build/feature/test-libcrypto.c index bd79dc7..a98174e 100644 --- a/tools/build/feature/test-libcrypto.c +++ b/tools/build/feature/test-libcrypto.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <openssl/sha.h> #include <openssl/md5.h> diff --git a/tools/build/feature/test-libdw-dwarf-unwind.c b/tools/build/feature/test-libdw-dwarf-unwind.c index f676a3f..ed03d95 100644 --- a/tools/build/feature/test-libdw-dwarf-unwind.c +++ b/tools/build/feature/test-libdw-dwarf-unwind.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <elfutils/libdwfl.h> diff --git a/tools/build/feature/test-libelf-gelf_getnote.c b/tools/build/feature/test-libelf-gelf_getnote.c index d78cf4d..075d062 100644 --- a/tools/build/feature/test-libelf-gelf_getnote.c +++ b/tools/build/feature/test-libelf-gelf_getnote.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdlib.h> #include <gelf.h> diff --git a/tools/build/feature/test-libelf-getphdrnum.c b/tools/build/feature/test-libelf-getphdrnum.c index d710459..96a7f8d 100644 --- a/tools/build/feature/test-libelf-getphdrnum.c +++ b/tools/build/feature/test-libelf-getphdrnum.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <libelf.h> int main(void) diff --git a/tools/build/feature/test-libelf-getshdrstrndx.c b/tools/build/feature/test-libelf-getshdrstrndx.c index f0c3b47..ae9f2ff 100644 --- a/tools/build/feature/test-libelf-getshdrstrndx.c +++ b/tools/build/feature/test-libelf-getshdrstrndx.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <libelf.h> int main(void) diff --git a/tools/build/feature/test-libelf-mmap.c b/tools/build/feature/test-libelf-mmap.c index 564427d..2c3ef81 100644 --- a/tools/build/feature/test-libelf-mmap.c +++ b/tools/build/feature/test-libelf-mmap.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <libelf.h> int main(void) diff --git a/tools/build/feature/test-libelf.c b/tools/build/feature/test-libelf.c index 08db322..9050441 100644 --- a/tools/build/feature/test-libelf.c +++ b/tools/build/feature/test-libelf.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <libelf.h> int main(void) diff --git a/tools/build/feature/test-libnuma.c b/tools/build/feature/test-libnuma.c index 4763d9c..b3aa59f 100644 --- a/tools/build/feature/test-libnuma.c +++ b/tools/build/feature/test-libnuma.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <numa.h> #include <numaif.h> diff --git a/tools/build/feature/test-libperl.c b/tools/build/feature/test-libperl.c index 8871f6a..0415f43 100644 --- a/tools/build/feature/test-libperl.c +++ b/tools/build/feature/test-libperl.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <EXTERN.h> #include <perl.h> diff --git a/tools/build/feature/test-libpython-version.c b/tools/build/feature/test-libpython-version.c index facea12..47714b9 100644 --- a/tools/build/feature/test-libpython-version.c +++ b/tools/build/feature/test-libpython-version.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <Python.h> #if PY_VERSION_HEX >= 0x03000000 diff --git a/tools/build/feature/test-libpython.c b/tools/build/feature/test-libpython.c index b24b28a..0c1641b 100644 --- a/tools/build/feature/test-libpython.c +++ b/tools/build/feature/test-libpython.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <Python.h> int main(void) diff --git a/tools/build/feature/test-libslang.c b/tools/build/feature/test-libslang.c index 22ff22e..9cbff8d 100644 --- a/tools/build/feature/test-libslang.c +++ b/tools/build/feature/test-libslang.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <slang.h> int main(void) diff --git a/tools/build/feature/test-libunwind-aarch64.c b/tools/build/feature/test-libunwind-aarch64.c index fc03fb6..323803f 100644 --- a/tools/build/feature/test-libunwind-aarch64.c +++ b/tools/build/feature/test-libunwind-aarch64.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <libunwind-aarch64.h> #include <stdlib.h> diff --git a/tools/build/feature/test-libunwind-arm.c b/tools/build/feature/test-libunwind-arm.c index 632d95e..cb378b7 100644 --- a/tools/build/feature/test-libunwind-arm.c +++ b/tools/build/feature/test-libunwind-arm.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <libunwind-arm.h> #include <stdlib.h> diff --git a/tools/build/feature/test-libunwind-debug-frame-aarch64.c b/tools/build/feature/test-libunwind-debug-frame-aarch64.c index 2284467..36d6646 100644 --- a/tools/build/feature/test-libunwind-debug-frame-aarch64.c +++ b/tools/build/feature/test-libunwind-debug-frame-aarch64.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <libunwind-aarch64.h> #include <stdlib.h> diff --git a/tools/build/feature/test-libunwind-debug-frame-arm.c b/tools/build/feature/test-libunwind-debug-frame-arm.c index f988596..8696e48 100644 --- a/tools/build/feature/test-libunwind-debug-frame-arm.c +++ b/tools/build/feature/test-libunwind-debug-frame-arm.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <libunwind-arm.h> #include <stdlib.h> diff --git a/tools/build/feature/test-libunwind-debug-frame.c b/tools/build/feature/test-libunwind-debug-frame.c index 0ef8087..efb55cd 100644 --- a/tools/build/feature/test-libunwind-debug-frame.c +++ b/tools/build/feature/test-libunwind-debug-frame.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <libunwind.h> #include <stdlib.h> diff --git a/tools/build/feature/test-libunwind-x86.c b/tools/build/feature/test-libunwind-x86.c index 3561edc..e5e0f6c 100644 --- a/tools/build/feature/test-libunwind-x86.c +++ b/tools/build/feature/test-libunwind-x86.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <libunwind-x86.h> #include <stdlib.h> diff --git a/tools/build/feature/test-libunwind-x86_64.c b/tools/build/feature/test-libunwind-x86_64.c index 5add251..62ae4db 100644 --- a/tools/build/feature/test-libunwind-x86_64.c +++ b/tools/build/feature/test-libunwind-x86_64.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <libunwind-x86_64.h> #include <stdlib.h> diff --git a/tools/build/feature/test-libunwind.c b/tools/build/feature/test-libunwind.c index 43b9369..53fd266 100644 --- a/tools/build/feature/test-libunwind.c +++ b/tools/build/feature/test-libunwind.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <libunwind.h> #include <stdlib.h> diff --git a/tools/build/feature/test-llvm-version.cpp b/tools/build/feature/test-llvm-version.cpp index 896d317..8a09162 100644 --- a/tools/build/feature/test-llvm-version.cpp +++ b/tools/build/feature/test-llvm-version.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <cstdio> #include "llvm/Config/llvm-config.h" diff --git a/tools/build/feature/test-llvm.cpp b/tools/build/feature/test-llvm.cpp index 455a332..88a3d1b 100644 --- a/tools/build/feature/test-llvm.cpp +++ b/tools/build/feature/test-llvm.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/raw_ostream.h" #define NUM_VERSION (((LLVM_VERSION_MAJOR) << 16) + (LLVM_VERSION_MINOR << 8) + LLVM_VERSION_PATCH) diff --git a/tools/build/feature/test-lzma.c b/tools/build/feature/test-lzma.c index 95adc8c..78682bb 100644 --- a/tools/build/feature/test-lzma.c +++ b/tools/build/feature/test-lzma.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <lzma.h> int main(void) diff --git a/tools/build/feature/test-numa_num_possible_cpus.c b/tools/build/feature/test-numa_num_possible_cpus.c index 2606e94..573d07b 100644 --- a/tools/build/feature/test-numa_num_possible_cpus.c +++ b/tools/build/feature/test-numa_num_possible_cpus.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <numa.h> int main(void) diff --git a/tools/build/feature/test-pthread-attr-setaffinity-np.c b/tools/build/feature/test-pthread-attr-setaffinity-np.c index fdada5e..38c7113 100644 --- a/tools/build/feature/test-pthread-attr-setaffinity-np.c +++ b/tools/build/feature/test-pthread-attr-setaffinity-np.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdint.h> #include <pthread.h> #include <sched.h> diff --git a/tools/build/feature/test-sched_getcpu.c b/tools/build/feature/test-sched_getcpu.c index 9c6b4cb..e448deb 100644 --- a/tools/build/feature/test-sched_getcpu.c +++ b/tools/build/feature/test-sched_getcpu.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif diff --git a/tools/build/feature/test-sdt.c b/tools/build/feature/test-sdt.c index e4531a6..22737b0 100644 --- a/tools/build/feature/test-sdt.c +++ b/tools/build/feature/test-sdt.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <sys/sdt.h> int main(void) diff --git a/tools/build/feature/test-stackprotector-all.c b/tools/build/feature/test-stackprotector-all.c index c9f398d..c8a5719 100644 --- a/tools/build/feature/test-stackprotector-all.c +++ b/tools/build/feature/test-stackprotector-all.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> int main(void) diff --git a/tools/build/feature/test-sync-compare-and-swap.c b/tools/build/feature/test-sync-compare-and-swap.c index c34d4ca..1e38d19 100644 --- a/tools/build/feature/test-sync-compare-and-swap.c +++ b/tools/build/feature/test-sync-compare-and-swap.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <stdint.h> volatile uint64_t x; diff --git a/tools/build/feature/test-timerfd.c b/tools/build/feature/test-timerfd.c index 8c5c083..9c72c69 100644 --- a/tools/build/feature/test-timerfd.c +++ b/tools/build/feature/test-timerfd.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * test for timerfd functions used by perf-kvm-stat-live */ diff --git a/tools/build/feature/test-zlib.c b/tools/build/feature/test-zlib.c index e111fff..da6c357 100644 --- a/tools/build/feature/test-zlib.c +++ b/tools/build/feature/test-zlib.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include <zlib.h> int main(void) diff --git a/tools/build/fixdep.c b/tools/build/fixdep.c index 734d154..2501fea 100644 --- a/tools/build/fixdep.c +++ b/tools/build/fixdep.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * "Optimize" a list of dependencies as spit out by gcc -MD * for the build framework. diff --git a/tools/build/tests/ex/Makefile b/tools/build/tests/ex/Makefile index 027d6c8..fee032e 100644 --- a/tools/build/tests/ex/Makefile +++ b/tools/build/tests/ex/Makefile @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 export srctree := $(abspath ../../../..) export CC := gcc export LD := ld diff --git a/tools/build/tests/ex/a.c b/tools/build/tests/ex/a.c index 8517627..66017a9 100644 --- a/tools/build/tests/ex/a.c +++ b/tools/build/tests/ex/a.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 int a(void) { diff --git a/tools/build/tests/ex/arch/e.c b/tools/build/tests/ex/arch/e.c index beaa4a1..f6ef585 100644 --- a/tools/build/tests/ex/arch/e.c +++ b/tools/build/tests/ex/arch/e.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 int e(void) { diff --git a/tools/build/tests/ex/arch/f.c b/tools/build/tests/ex/arch/f.c index 7c3e9e9..bffd9c6 100644 --- a/tools/build/tests/ex/arch/f.c +++ b/tools/build/tests/ex/arch/f.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 int f(void) { diff --git a/tools/build/tests/ex/b.c b/tools/build/tests/ex/b.c index c24ff9c..2b29fb4 100644 --- a/tools/build/tests/ex/b.c +++ b/tools/build/tests/ex/b.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 int b(void) { diff --git a/tools/build/tests/ex/c.c b/tools/build/tests/ex/c.c index e216d02..a63b20a 100644 --- a/tools/build/tests/ex/c.c +++ b/tools/build/tests/ex/c.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 int c(void) { diff --git a/tools/build/tests/ex/d.c b/tools/build/tests/ex/d.c index 80dc0f0..e114e8d 100644 --- a/tools/build/tests/ex/d.c +++ b/tools/build/tests/ex/d.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 int d(void) { diff --git a/tools/build/tests/ex/ex.c b/tools/build/tests/ex/ex.c index 57de607..3c02756 100644 --- a/tools/build/tests/ex/ex.c +++ b/tools/build/tests/ex/ex.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 int a(void); int b(void); diff --git a/tools/build/tests/ex/inc.c b/tools/build/tests/ex/inc.c index c20f1e9..3636ab5 100644 --- a/tools/build/tests/ex/inc.c +++ b/tools/build/tests/ex/inc.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #ifdef INCLUDE #include "krava.h" #endif diff --git a/tools/build/tests/run.sh b/tools/build/tests/run.sh index 44d2a0f..2c54e4d 100755 --- a/tools/build/tests/run.sh +++ b/tools/build/tests/run.sh @@ -1,4 +1,5 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0 function test_ex { make -C ex V=1 clean > ex.out 2>&1 |