History

LICENSES: Explicitly allow SPDX-FileCopyrightText

Sources already have SPDX-FileCopyrightText (~40 instances) and more appear on the mailing list, so document that it is allowed. On the other hand SPDX defines several other tags like SPDX-FileType, so add checkpatch rule to narrow desired tags only to two of them - license and copyright. That way no new tags would sneak in to the kernel unnoticed.

Krzysztof Kozlowski committed 8 months ago

Commit ebf1baf1 parent f338e772 files · +13 −2Browse files

Showing the changes to scripts/checkpatch.pl (1 of 2 files). Show all

Unified · Split

scripts/checkpatch.pl+8−0
@@ -3856,6 +3856,14 @@ sub process { · 3855 unmodified lines
3856 "Misplaced SPDX-License-Identifier tag - use line $checklicenseline instead\n" . $herecurr);3856 "Misplaced SPDX-License-Identifier tag - use line $checklicenseline instead\n" . $herecurr);
3857 }3857 }
3858 3858
3859# check for disallowed SPDX file tags
3860 if ($rawline =~ /\bSPDX-.*:/ &&
3861 $rawline !~ /\bSPDX-License-Identifier:/ &&
3862 $rawline !~ /\bSPDX-FileCopyrightText:/) {
3863 WARN("SPDX_LICENSE_TAG",
3864 "Disallowed SPDX tag\n" . $herecurr);
3865 }
3866
3859# line length limit (with some exclusions)3867# line length limit (with some exclusions)
3860#3868#
3861# There are a few types of lines that may extend beyond $max_line_length:3869# There are a few types of lines that may extend beyond $max_line_length: