summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-04-24 13:30:54 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2026-04-24 13:30:54 -0700
commitf9569c6ce4a4bbad0876ca7bd1e04fbfbbc1641f (patch)
treec2b6752bb078de1593437400ae359ea1e4af2ab0 /scripts
parentcb4eb6771c0f8fd1c52a8f6fdec7762fb087380a (diff)
parentebf1bafd090790704ba54c032de299fccd90a9da (diff)
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
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 1eff43fd8f95..0492d6afc9a1 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3866,6 +3866,14 @@ sub process {
"Misplaced SPDX-License-Identifier tag - use line $checklicenseline instead\n" . $herecurr);
}
+# check for disallowed SPDX file tags
+ if ($rawline =~ /\bSPDX-.*:/ &&
+ $rawline !~ /\bSPDX-License-Identifier:/ &&
+ $rawline !~ /\bSPDX-FileCopyrightText:/) {
+ WARN("SPDX_LICENSE_TAG",
+ "Disallowed SPDX tag\n" . $herecurr);
+ }
+
# line length limit (with some exclusions)
#
# There are a few types of lines that may extend beyond $max_line_length: