]> exis.tech > repos - linux.git/commitdiff
Merge tag 'spdx-7.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 24 Apr 2026 20:30:54 +0000 (13:30 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 24 Apr 2026 20:30:54 +0000 (13:30 -0700)
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

1  2 
scripts/checkpatch.pl

diff --combined scripts/checkpatch.pl
index 1eff43fd8f95dc81ec410231b6e49f2c5a39bcd2,2860f02a63e50ce663191270a85a49816b913901..0492d6afc9a1fc6ca3dfa4e7e8e5764584c4f16f
@@@ -641,7 -641,6 +641,7 @@@ our $signature_tags = qr{(?xi
        Reviewed-by:|
        Reported-by:|
        Suggested-by:|
 +      Assisted-by:|
        To:|
        Cc:
  )};
@@@ -2929,7 -2928,7 +2929,7 @@@ sub process 
                        }
                        $checklicenseline = 1;
  
 -                      if ($realfile !~ /^MAINTAINERS/) {
 +                      if ($realfile !~ /^(MAINTAINERS|dev\/null)/) {
                                my $last_binding_patch = $is_binding_patch;
  
                                $is_binding_patch = () = $realfile =~ m@^(?:Documentation/devicetree/|include/dt-bindings/)@;
                                }
                        }
  
 +                      # Assisted-by uses AGENT_NAME:MODEL_VERSION format, not email
 +                      if ($sign_off =~ /^Assisted-by:/i) {
 +                              if ($email !~ /^\S+:\S+/) {
 +                                      WARN("BAD_SIGN_OFF",
 +                                           "Assisted-by expects 'AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]' format\n" . $herecurr);
 +                              }
 +                              next;
 +                      }
 +
                        my ($email_name, $name_comment, $email_address, $comment) = parse_email($email);
                        my $suggested_email = format_email(($email_name, $name_comment, $email_address, $comment));
                        if ($suggested_email eq "") {
                             "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:
                }
  
  # check for various structs that are normally const (ops, kgdb, device_tree)
 -# and avoid what seem like struct definitions 'struct foo {'
 +# and avoid what seem like struct definitions 'struct foo {' or forward declarations 'struct foo;'
                if (defined($const_structs) &&
                    $line !~ /\bconst\b/ &&
 -                  $line =~ /\bstruct\s+($const_structs)\b(?!\s*\{)/) {
 +                  $line =~ /\bstruct\s+($const_structs)\b(?!\s*[\{;])/) {
                        WARN("CONST_STRUCT",
                             "struct $1 should normally be const\n" . $herecurr);
                }