Re: [PATCH] rust: macros: add `paste!` proc macro

From: Gary Guo
Date: Wed Aug 09 2023 - 18:02:57 EST


On Wed, 9 Aug 2023 23:45:34 +0200
Miguel Ojeda <miguel.ojeda.sandonis@xxxxxxxxx> wrote:

> On Wed, Jun 28, 2023 at 7:12 PM Gary Guo <gary@xxxxxxxxxxx> wrote:
> >
> > diff --git a/rust/macros/paste.rs b/rust/macros/paste.rs
> > new file mode 100644
> > index 000000000000..42fde0930b05
> > --- /dev/null
> > +++ b/rust/macros/paste.rs
> > @@ -0,0 +1,94 @@
> > +use proc_macro::{Delimiter, Group, Ident, Spacing, Span, TokenTree};
>
> We need the license identifier to apply this -- is it our usual one?
>
> // SPDX-License-Identifier: GPL-2.0
>
> If so, for the record, could you please confirm it is? Then I will add
> it on my side and apply it -- thanks!
>
> Cheers,
> Miguel

Hi Miguel,

Sorry I forgot to add license comments!

All my kernel contributions are permissively licensed if possible, so I
am fine with this being either MIT or GPL-2.0 (I think GPL-2.0 is
deprecated in as a SPDX license identifier and it should be
GPL-2.0-only going forward, though).

Given this is non-kernel specific generic code, I think it might worth
following the convention of the paste and pin-init code and make it
`Apache-2.0 OR MIT`? This would also make it the same license as the
`paste` crate (although we don't have to keep the same license as this
is a different implementation).

I'll leave the final decision to you.

Best,
Gary