All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miguel Ojeda <ojeda@kernel.org>
To: Miguel Ojeda <ojeda@kernel.org>,
	Alex Gaynor <alex.gaynor@gmail.com>,
	Nathan Chancellor <nathan@kernel.org>,
	Nicolas Schier <nicolas@fjasle.eu>
Cc: "Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>,
	rust-for-linux@vger.kernel.org, linux-kbuild@vger.kernel.org,
	linux-kernel@vger.kernel.org, patches@lists.linux.dev,
	"Jesung Yang" <y.j3ms.n@gmail.com>
Subject: [PATCH v2 07/20] rust: proc-macro2: add SPDX License Identifiers
Date: Mon, 24 Nov 2025 16:18:19 +0100	[thread overview]
Message-ID: <20251124151837.2184382-8-ojeda@kernel.org> (raw)
In-Reply-To: <20251124151837.2184382-1-ojeda@kernel.org>

Originally, when the Rust upstream `alloc` standard library crate was
vendored in commit 057b8d257107 ("rust: adapt `alloc` crate to the
kernel"), the SPDX License Identifiers were added to every file so that
the license on those was clear.

Thus do the same for the `proc-macro2` crate.

This makes `scripts/spdxcheck.py` pass.

Reviewed-by: Gary Guo <gary@garyguo.net>
Tested-by: Gary Guo <gary@garyguo.net>
Tested-by: Jesung Yang <y.j3ms.n@gmail.com>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
 rust/proc-macro2/detection.rs                      | 2 ++
 rust/proc-macro2/extra.rs                          | 2 ++
 rust/proc-macro2/fallback.rs                       | 2 ++
 rust/proc-macro2/lib.rs                            | 2 ++
 rust/proc-macro2/location.rs                       | 2 ++
 rust/proc-macro2/marker.rs                         | 2 ++
 rust/proc-macro2/parse.rs                          | 2 ++
 rust/proc-macro2/probe.rs                          | 2 ++
 rust/proc-macro2/probe/proc_macro_span.rs          | 2 ++
 rust/proc-macro2/probe/proc_macro_span_file.rs     | 2 ++
 rust/proc-macro2/probe/proc_macro_span_location.rs | 2 ++
 rust/proc-macro2/rcvec.rs                          | 2 ++
 rust/proc-macro2/wrapper.rs                        | 2 ++
 13 files changed, 26 insertions(+)

diff --git a/rust/proc-macro2/detection.rs b/rust/proc-macro2/detection.rs
index beba7b237395..3de448cb2dde 100644
--- a/rust/proc-macro2/detection.rs
+++ b/rust/proc-macro2/detection.rs
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 use core::sync::atomic::{AtomicUsize, Ordering};
 use std::sync::Once;
 
diff --git a/rust/proc-macro2/extra.rs b/rust/proc-macro2/extra.rs
index 522a90e136be..55feb5ec7526 100644
--- a/rust/proc-macro2/extra.rs
+++ b/rust/proc-macro2/extra.rs
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 //! Items which do not have a correspondence to any API in the proc_macro crate,
 //! but are necessary to include in proc-macro2.
 
diff --git a/rust/proc-macro2/fallback.rs b/rust/proc-macro2/fallback.rs
index 1560105cfd25..9e005d67f7f5 100644
--- a/rust/proc-macro2/fallback.rs
+++ b/rust/proc-macro2/fallback.rs
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 #[cfg(wrap_proc_macro)]
 use crate::imp;
 #[cfg(span_locations)]
diff --git a/rust/proc-macro2/lib.rs b/rust/proc-macro2/lib.rs
index 2984af335adc..7b78d065d51c 100644
--- a/rust/proc-macro2/lib.rs
+++ b/rust/proc-macro2/lib.rs
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 //! [![github]](https://github.com/dtolnay/proc-macro2)&ensp;[![crates-io]](https://crates.io/crates/proc-macro2)&ensp;[![docs-rs]](crate)
 //!
 //! [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github
diff --git a/rust/proc-macro2/location.rs b/rust/proc-macro2/location.rs
index 7190e2d05255..3a11871e2943 100644
--- a/rust/proc-macro2/location.rs
+++ b/rust/proc-macro2/location.rs
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 use core::cmp::Ordering;
 
 /// A line-column pair representing the start or end of a `Span`.
diff --git a/rust/proc-macro2/marker.rs b/rust/proc-macro2/marker.rs
index 23b94ce6fa85..6f322424808c 100644
--- a/rust/proc-macro2/marker.rs
+++ b/rust/proc-macro2/marker.rs
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 use alloc::rc::Rc;
 use core::marker::PhantomData;
 use core::panic::{RefUnwindSafe, UnwindSafe};
diff --git a/rust/proc-macro2/parse.rs b/rust/proc-macro2/parse.rs
index b8be403f842f..a005dea1fe88 100644
--- a/rust/proc-macro2/parse.rs
+++ b/rust/proc-macro2/parse.rs
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 use crate::fallback::{
     self, is_ident_continue, is_ident_start, Group, Ident, LexError, Literal, Span, TokenStream,
     TokenStreamBuilder,
diff --git a/rust/proc-macro2/probe.rs b/rust/proc-macro2/probe.rs
index b67f52036218..d68aa8cfd85e 100644
--- a/rust/proc-macro2/probe.rs
+++ b/rust/proc-macro2/probe.rs
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 #![allow(dead_code)]
 
 #[cfg(proc_macro_span)]
diff --git a/rust/proc-macro2/probe/proc_macro_span.rs b/rust/proc-macro2/probe/proc_macro_span.rs
index 2d7d44e07708..892a7eb3e5a0 100644
--- a/rust/proc-macro2/probe/proc_macro_span.rs
+++ b/rust/proc-macro2/probe/proc_macro_span.rs
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 // This code exercises the surface area that we expect of Span's unstable API.
 // If the current toolchain is able to compile it, then proc-macro2 is able to
 // offer these APIs too.
diff --git a/rust/proc-macro2/probe/proc_macro_span_file.rs b/rust/proc-macro2/probe/proc_macro_span_file.rs
index 8b76bdf5007b..f2dbc4056ebe 100644
--- a/rust/proc-macro2/probe/proc_macro_span_file.rs
+++ b/rust/proc-macro2/probe/proc_macro_span_file.rs
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 // The subset of Span's API stabilized in Rust 1.88.
 
 extern crate proc_macro;
diff --git a/rust/proc-macro2/probe/proc_macro_span_location.rs b/rust/proc-macro2/probe/proc_macro_span_location.rs
index 79da34af54af..ae19c93394fa 100644
--- a/rust/proc-macro2/probe/proc_macro_span_location.rs
+++ b/rust/proc-macro2/probe/proc_macro_span_location.rs
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 // The subset of Span's API stabilized in Rust 1.88.
 
 extern crate proc_macro;
diff --git a/rust/proc-macro2/rcvec.rs b/rust/proc-macro2/rcvec.rs
index 23edc77d597f..e224ebe277ef 100644
--- a/rust/proc-macro2/rcvec.rs
+++ b/rust/proc-macro2/rcvec.rs
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 use alloc::rc::Rc;
 use alloc::vec;
 use core::mem;
diff --git a/rust/proc-macro2/wrapper.rs b/rust/proc-macro2/wrapper.rs
index 2e3eb5b4d04e..6792e9834111 100644
--- a/rust/proc-macro2/wrapper.rs
+++ b/rust/proc-macro2/wrapper.rs
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: Apache-2.0 OR MIT
+
 use crate::detection::inside_proc_macro;
 use crate::fallback::{self, FromStr2 as _};
 #[cfg(span_locations)]
-- 
2.52.0


  parent reply	other threads:[~2025-11-24 15:19 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-24 15:18 [PATCH v2 00/20] `syn` support Miguel Ojeda
2025-11-24 15:18 ` [PATCH v2 01/20] rust: kbuild: introduce `core-flags` and `core-skip_flags` Miguel Ojeda
2025-11-24 15:18 ` [PATCH v2 02/20] rust: kbuild: simplify `--cfg` handling Miguel Ojeda
2025-11-24 15:18 ` [PATCH v2 03/20] rust: kbuild: add proc macro library support Miguel Ojeda
2025-11-24 15:18 ` [PATCH v2 04/20] rust: kbuild: support skipping flags in `rustc_test_library` Miguel Ojeda
2025-11-24 15:18 ` [PATCH v2 05/20] rust: kbuild: support using libraries in `rustc_procmacro` Miguel Ojeda
2025-11-24 15:18 ` [PATCH v2 06/20] rust: proc-macro2: import crate Miguel Ojeda
2025-11-24 15:18 ` Miguel Ojeda [this message]
2025-11-24 15:18 ` [PATCH v2 08/20] rust: proc-macro2: remove `unicode_ident` dependency Miguel Ojeda
2025-11-24 15:18 ` [PATCH v2 09/20] rust: proc-macro2: add `README.md` Miguel Ojeda
2025-11-24 15:18 ` [PATCH v2 10/20] rust: proc-macro2: enable support in kbuild Miguel Ojeda
2025-11-24 15:18 ` [PATCH v2 11/20] rust: quote: import crate Miguel Ojeda
2025-11-24 15:18 ` [PATCH v2 12/20] rust: quote: add SPDX License Identifiers Miguel Ojeda
2025-11-24 15:18 ` [PATCH v2 13/20] rust: quote: add `README.md` Miguel Ojeda
2025-11-24 15:18 ` [PATCH v2 14/20] rust: quote: enable support in kbuild Miguel Ojeda
2025-11-24 15:18 ` [PATCH v2 15/20] rust: syn: import crate Miguel Ojeda
2025-11-24 15:18 ` [PATCH v2 16/20] rust: syn: add SPDX License Identifiers Miguel Ojeda
2025-11-24 15:18 ` [PATCH v2 17/20] rust: syn: remove `unicode-ident` dependency Miguel Ojeda
2025-11-24 15:18 ` [PATCH v2 18/20] rust: syn: add `README.md` Miguel Ojeda
2025-11-24 15:18 ` [PATCH v2 19/20] rust: syn: enable support in kbuild Miguel Ojeda
2026-01-04 23:17   ` Tamir Duberstein
2026-01-05  4:31     ` Jesung Yang
2025-11-24 15:18 ` [PATCH v2 20/20] rust: macros: support `proc-macro2`, `quote` and `syn` Miguel Ojeda
2025-11-24 16:23 ` [PATCH v2 00/20] `syn` support Miguel Ojeda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251124151837.2184382-8-ojeda@kernel.org \
    --to=ojeda@kernel.org \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=nathan@kernel.org \
    --cc=nicolas@fjasle.eu \
    --cc=patches@lists.linux.dev \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    --cc=y.j3ms.n@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.