Re: [PATCH v3 4/6] rust: sync: replace `kernel::c_str!` with C-Strings
From: Tamir Duberstein
Date: Mon Nov 17 2025 - 12:23:42 EST
On Mon, Nov 17, 2025 at 9:49 AM Alice Ryhl <aliceryhl@xxxxxxxxxx> wrote:
>
> On Mon, Nov 17, 2025 at 12:52:22AM +0100, Miguel Ojeda wrote:
> > On Mon, Nov 17, 2025 at 12:09 AM Miguel Ojeda
> > <miguel.ojeda.sandonis@xxxxxxxxx> wrote:
> > >
> > > This requires the next commit plus it needs callers of `new_spinlock!`
> > > in Binder to be fixed at the same time.
> >
> > Actually, do we even want callers to have to specify `c`?
> >
> > For instance, in the `module!` macro we originally had `b`, and
> > removed it for simplicity of callers:
> >
> > b13c9880f909 ("rust: macros: take string literals in `module!`")
>
> Yeah I think ideally the new_spinlock! macro invokes c_str! on the
> provided string literal to avoid users of the macro from needing the
> c prefix.
>
> Alice
Makes sense and done in v4 (which contains only a small portion of
this patch and no others).