]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rust: zerocopy-derive: add SPDX License Identifiers
authorMiguel Ojeda <ojeda@kernel.org>
Mon, 8 Jun 2026 14:14:33 +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-derive` 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).

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-15-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/zerocopy-derive/derive/from_bytes.rs
rust/zerocopy-derive/derive/into_bytes.rs
rust/zerocopy-derive/derive/known_layout.rs
rust/zerocopy-derive/derive/mod.rs
rust/zerocopy-derive/derive/try_from_bytes.rs
rust/zerocopy-derive/derive/unaligned.rs
rust/zerocopy-derive/lib.rs
rust/zerocopy-derive/repr.rs
rust/zerocopy-derive/util.rs

index ad8b6233fe5494c3f043720f22e1648a527c397a..d693a63b7645171c338e17d30f3f50e0e139bb8f 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT
+
 use proc_macro2::{Span, TokenStream};
 use syn::{
     parse_quote, Data, DataEnum, DataStruct, DataUnion, Error, Expr, ExprLit, ExprUnary, Lit, UnOp,
index 8c1e1009dd915607ebd67f546a59c86d8c3acf04..ad52a6b45d288d9555dde49d44f9da0a1a4e6d89 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT
+
 use proc_macro2::{Span, TokenStream};
 use quote::quote;
 use syn::{Data, DataEnum, DataStruct, DataUnion, Error, Type};
index b91b4de0098cca7bd38b7b839f265656153d89b8..fddffd167c827f402cc88451a4acbdc62dcf63e9 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT
+
 use proc_macro2::TokenStream;
 use quote::quote;
 use syn::{parse_quote, Data, Error, Type};
index a3d066ed2b4d74faba34becdc271dbc69b6248fe..665ba7da55a8013c4f863a4b15dfb1f6474de9cd 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT
+
 pub mod from_bytes;
 pub mod into_bytes;
 pub mod known_layout;
index 4e36ab40bcf86cea9326cb109e9b533397a15b69..ce9c926d5b8e9501343ccefb08461d4ad32bc452 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT
+
 use proc_macro2::TokenStream;
 use quote::quote;
 use syn::{
index 819d84984a03ced346e4b43b2a43747bad2c9978..d6dea0a11f1ebd2b53feb0c1f4bd2660ee942e3d 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: (BSD-2-Clause OR Apache-2.0) OR MIT
+
 use proc_macro2::{Span, TokenStream};
 use syn::{Data, DataEnum, DataStruct, DataUnion, Error};
 
index a1d10a2ada273824ddd5bbefd6896cc2d4dcdba5..c517ea7db1eb1f108799ea8bab48a8dfd1f3b68d 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 57014b38b2da634a20a4230a46281eea0c11be30..74fd376d9fdabef8f6e13f909c2b03c13fc012d9 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 4ec28bf95758e579d930bf919a4e0f90d10fba3b..5ba5228e2a44fc23067ef257a7b8eda2ae058c30 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