Re: [PATCH] rust: replace `kernel::c_str!` with C-Strings in seq_file and device

From: Tamir Duberstein

Date: Tue Jan 20 2026 - 16:22:46 EST


On Tue, Jan 20, 2026 at 10:17 AM Gary Guo <gary@xxxxxxxxxxx> wrote:
>
> On Tue Jan 20, 2026 at 2:59 PM GMT, Ryan Foster wrote:
> > C-String literals were added in Rust 1.77. Replace instances of
> > `kernel::c_str!` with C-String literals where possible.
> >
> > This patch updates seq_file and device modules to use the native
> > C-string literal syntax (c"...") instead of the kernel::c_str! macro.
> >
> > While at it, convert imports to the kernel vertical import style.
> >
> > Signed-off-by: Ryan Foster <foster.ryan.r@xxxxxxxxx>
>
> Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>

device.rs was done in
https://lore.kernel.org/all/20251222-cstr-driver-core-v1-0-1142a177d0fd@xxxxxxxxx/
and seq_file.rs is waiting for a maintainer's ack in
https://lore.kernel.org/all/20251222-cstr-vfs-v1-1-18e3d327cbd7@xxxxxxxxx/.