]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rust: zerocopy: add SPDX License Identifiers
authorMiguel Ojeda <ojeda@kernel.org>
Mon, 8 Jun 2026 14:14:28 +0000 (16:14 +0200)
committerMiguel Ojeda <ojeda@kernel.org>
Tue, 9 Jun 2026 02:13:22 +0000 (04:13 +0200)
Originally, when the Rust upstream `alloc` standard library crate was
vendored, the SPDX License Identifiers were added to every file so that
the license on those was clear. The same happened with the vendoring of
`proc_macro2`, `quote` and `syn`. Please see:

  commit 057b8d257107 ("rust: adapt `alloc` crate to the kernel")
  commit 69942c0a8965 ("rust: syn: add SPDX License Identifiers")
  commit ddfa1b279d08 ("rust: quote: add SPDX License Identifiers")
  commit a9acfceb9614 ("rust: proc-macro2: add SPDX License Identifiers")

Thus do the same for the `zerocopy` crate.

This makes `scripts/spdxcheck.py` pass: use parentheses like commit
06e9bfc1e57d ("ionic: make spdxcheck.py happy") did since we have two
`OR` operators in the expression (three licenses).

SPDX identifiers are not added to the `benches` files because they are
included in rendered documentation. Nevertheless, the `README.md` to be
added by a later commit mentions the license.

Finally, as requested, I filed an issue [1] with upstream about it.

Cc: Joshua Liebow-Feeser <joshlf@google.com>
Cc: Jack Wrenn <jswrenn@google.com>
Link: https://github.com/google/zerocopy/issues/3428
Link: https://patch.msgid.link/20260608141439.182634-10-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
20 files changed:
rust/zerocopy/rustdoc/style.css
rust/zerocopy/src/byte_slice.rs
rust/zerocopy/src/byteorder.rs
rust/zerocopy/src/deprecated.rs
rust/zerocopy/src/error.rs
rust/zerocopy/src/impls.rs
rust/zerocopy/src/layout.rs
rust/zerocopy/src/lib.rs
rust/zerocopy/src/macros.rs
rust/zerocopy/src/pointer/inner.rs
rust/zerocopy/src/pointer/invariant.rs
rust/zerocopy/src/pointer/mod.rs
rust/zerocopy/src/pointer/ptr.rs
rust/zerocopy/src/pointer/transmute.rs
rust/zerocopy/src/ref.rs
rust/zerocopy/src/split_at.rs
rust/zerocopy/src/util/macro_util.rs
rust/zerocopy/src/util/macros.rs
rust/zerocopy/src/util/mod.rs
rust/zerocopy/src/wrappers.rs

index c5c8aeb743a11c03c31a2af57f1ca37c5d09e3e1..414348964af279192097db0cca1188edfc53f087 100644 (file)
@@ -1,3 +1,5 @@
+/* SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT */
+
 /*
 Copyright 2026 The Fuchsia Authors
 
index 6f9ee9ac3336d84dadfbb906da8c32c1f1a19eea..a5ded4a18b3978ff2023cbcbad6ab00743f2e6f4 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT
+
 // Copyright 2024 The Fuchsia Authors
 //
 // Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
index 257505203415640920dbb09407c43d5149317609..36ca4c0c88b0a493d030afab5d4061452c805db5 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT
+
 // Copyright 2019 The Fuchsia Authors
 //
 // Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
index 61b29aa5f485e3b4a03cfd37f4623300b75e9c4b..24bafbf9adebeb5adb29a234dee14b3a28893b6c 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT
+
 // Copyright 2024 The Fuchsia Authors
 //
 // Licensed under the 2-Clause BSD License <LICENSE-BSD or
index 05fdfe3b91f88267a1ce060c0be9698b5ca5203b..7cb08c31d452cc82d1870bfa1462a5cd616965f3 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT
+
 // Copyright 2024 The Fuchsia Authors
 //
 // Licensed under the 2-Clause BSD License <LICENSE-BSD or
index 80538bfc8a26e11d8a6a9a3d08cca3ad9d70c524..22fd6c3d5d9409b4f217f13886450eac211527b3 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT
+
 // Copyright 2024 The Fuchsia Authors
 //
 // Licensed under the 2-Clause BSD License <LICENSE-BSD or
index 19ad5ca85f744366c97007d99d94dcaf483d1756..6015d0f2de52adc3c0d3c726af3e4b9b6fde1cd4 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT
+
 // Copyright 2024 The Fuchsia Authors
 //
 // Licensed under the 2-Clause BSD License <LICENSE-BSD or
index 89a696f732b816e24f33eb97c8bc125651a7f0df..3302d67602abd6637a66e39789974c13a2a98a51 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT
+
 // Copyright 2018 The Fuchsia Authors
 //
 // Licensed under the 2-Clause BSD License <LICENSE-BSD or
index 948f8f912bb7e605107bbb18ef16a3123567f790..b801d86a8fa63e31f242b2b3ab8f16299ecdae67 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT
+
 // Copyright 2024 The Fuchsia Authors
 //
 // Licensed under the 2-Clause BSD License <LICENSE-BSD or
index c8dd9f01f4567992efd008002d266e8cbfcc780e..5db08080141fa4d35f966467fae488c02a23e028 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT
+
 // Copyright 2024 The Fuchsia Authors
 //
 // Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
index 2af211dd9fdd6abeb649c07d558d367f059f3bb0..1802d23563db8c47b8a089efe805aa15bd28a4f5 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT
+
 // Copyright 2024 The Fuchsia Authors
 //
 // Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
index 4c3658679d4634231f67037acffbfa8627405811..3461f7f5ca80e64316d350aa73b71762c93f2cf2 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT
+
 // Copyright 2023 The Fuchsia Authors
 //
 // Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
index 307b2aee63cab2a96c6b5dc58bcb05a4723377e5..b7c4ea56d2b2c16b5b58d048e49063a05bdd9eb6 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT
+
 // Copyright 2023 The Fuchsia Authors
 //
 // Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
index 45b4f727fd0d1a4ebc110f2ba85f51f93941692a..a534984b70d30a303e64ab6f0332381ce43735f9 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT
+
 // Copyright 2025 The Fuchsia Authors
 //
 // Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
index 496afc435c6114796e3bad3b79e3d827b222eac2..860066d7519628d9bcc38c9ae6357c96646ac8ff 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT
+
 // Copyright 2024 The Fuchsia Authors
 //
 // Licensed under the 2-Clause BSD License <LICENSE-BSD or
index 1d7b2c7d6032ad626551f406e238ddc22ca32f5c..9a67d5acbb0d7bc9f39015871984a88e93229420 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT
+
 // Copyright 2025 The Fuchsia Authors
 //
 // Licensed under the 2-Clause BSD License <LICENSE-BSD or
index 2235d0b8b49adfab9901bcfe38bee958d73a8978..1abb0fbeb46e621c0206085c13fad123ab3ec260 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT
+
 // Copyright 2022 The Fuchsia Authors
 //
 // Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
index 7dca5410c84fb4ff31bf8e2183ebe0d5a8ba83fe..43e4fd64ee1588952d8e57d67e02b97d022ce9ca 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT
+
 // Copyright 2023 The Fuchsia Authors
 //
 // Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
index 1a6c0b22a47b31e600fa8ad3a91419e68bcc7229..d6d4c6c2fcd9a08641ead9291b3fee3f03e12b2f 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT
+
 // Copyright 2023 The Fuchsia Authors
 //
 // Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
index f3930eb7ebc0fd727771fc73e244e1594bdcf026..266aec25fa580905d37ebe464574f4dacdc8eb1e 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT
+
 // Copyright 2023 The Fuchsia Authors
 //
 // Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0