Re: [PATCH v3 4/6] rust: sync: replace `kernel::c_str!` with C-Strings

From: Alice Ryhl
Date: Mon Nov 17 2025 - 09:52:04 EST


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