Skip to content

Commit f9569c6

Browse files
committed
Merge tag 'spdx-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx
Pull SPDX update from Greg KH: "Here is a single SPDX-like change for 7.1-rc1. It explicitly allows the use of SPDX-FileCopyrightText which has been used already in many files. At the same time, update checkpatch to catch any "non allowed" spdx identifiers as we don't want to go overboard here. This has been in linux-next for a long time with no reported problems" * tag 'spdx-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx: LICENSES: Explicitly allow SPDX-FileCopyrightText
2 parents cb4eb67 + ebf1baf commit f9569c6

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

Documentation/process/license-rules.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,11 @@ License identifier syntax
6363
The SPDX license identifier in kernel files shall be added at the first
6464
possible line in a file which can contain a comment. For the majority
6565
of files this is the first line, except for scripts which require the
66-
'#!PATH_TO_INTERPRETER' in the first line. For those scripts the SPDX
67-
identifier goes into the second line.
66+
'#!PATH_TO_INTERPRETER' in the first line. For those scripts, the SPDX
67+
license identifier goes into the second line.
68+
69+
The license identifier line can then be followed by one or multiple
70+
SPDX-FileCopyrightText lines if desired.
6871

6972
|
7073

scripts/checkpatch.pl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3866,6 +3866,14 @@ sub process {
38663866
"Misplaced SPDX-License-Identifier tag - use line $checklicenseline instead\n" . $herecurr);
38673867
}
38683868

3869+
# check for disallowed SPDX file tags
3870+
if ($rawline =~ /\bSPDX-.*:/ &&
3871+
$rawline !~ /\bSPDX-License-Identifier:/ &&
3872+
$rawline !~ /\bSPDX-FileCopyrightText:/) {
3873+
WARN("SPDX_LICENSE_TAG",
3874+
"Disallowed SPDX tag\n" . $herecurr);
3875+
}
3876+
38693877
# line length limit (with some exclusions)
38703878
#
38713879
# There are a few types of lines that may extend beyond $max_line_length:

0 commit comments

Comments
 (0)