[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAH5fLggU_DsJ4-gj_xBeGgG8mS4CSrypNsmOqu6c677Lyyvqxw@mail.gmail.com>
Date: Thu, 10 Jul 2025 15:20:41 +0200
From: Alice Ryhl <aliceryhl@...gle.com>
To: Tamir Duberstein <tamird@...il.com>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, Viresh Kumar <viresh.kumar@...aro.org>,
Danilo Krummrich <dakr@...nel.org>, David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Nishanth Menon <nm@...com>, Stephen Boyd <sboyd@...nel.org>, Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>,
Gary Guo <gary@...yguo.net>, Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <lossin@...nel.org>, Andreas Hindborg <a.hindborg@...nel.org>,
Trevor Gross <tmgross@...ch.edu>, linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
nouveau@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
rust-for-linux@...r.kernel.org
Subject: Re: [PATCH 0/6] Replace `kernel::str::CStr` with `core::ffi::CStr`
(cycle 1)
On Fri, Jul 4, 2025 at 10:16 PM Tamir Duberstein <tamird@...il.com> wrote:
>
> This series makes preparations for the replacement of our custom `CStr`
> type with the analogous type available in `core`.
>
> As this is a large migration that touches many subsystems, it will take
> place in several cycles, each of which may see multiple series:
> 1. introduces facades in the kernel crate that downstream
> code can reference. [this series]
> 2. migrate downstream code to kernel crate facades. (N series, divided
> by subsystem).
> 3. replace kernel crate facades to allow `Display`ing foreign types
> (such as `core::ffi::CStr`). Replace `CStr` with `core::ffi::CStr`.
> 4. migrate uses of `c_str!` to C-String literals. Replace references to
> `kernel::str::CStr` with `kernel::ffi::CStr`. (N series, divided by
> subsystem).
> 5. rename `c_str!` to discourage use. Remove `CStr` reexport from
> `kernel/str.rs`.
>
> Signed-off-by: Tamir Duberstein <tamird@...il.com>
> ---
> Tamir Duberstein (6):
> rust: kernel: remove `fmt!`, fix clippy::uninlined-format-args
> rust: kernel: add `fmt` module
> rust: use `kernel::{fmt,prelude::fmt!}`
> rust: str: remove unnecessary qualification
> rust: add `CStr` methods matching `core::ffi::CStr`
> rust: use `core::ffi::CStr` method names
>
> drivers/cpufreq/rcpufreq_dt.rs | 3 +-
> drivers/gpu/nova-core/firmware.rs | 5 +-
> rust/kernel/error.rs | 8 ++--
> rust/kernel/fmt.rs | 7 +++
> rust/kernel/lib.rs | 1 +
> rust/kernel/opp.rs | 2 +-
> rust/kernel/prelude.rs | 2 +-
> rust/kernel/print.rs | 6 +--
> rust/kernel/str.rs | 97 ++++++++++++++++++++++++---------------
> samples/rust/rust_print_main.rs | 2 +-
> 10 files changed, 83 insertions(+), 50 deletions(-)
> ---
> base-commit: 769e324b66b0d92d04f315d0c45a0f72737c7494
> change-id: 20250704-core-cstr-prepare-9b9e6a7bd57e
>
> Best regards,
> --
> Tamir Duberstein <tamird@...il.com>
>
Reviewed-by: Alice Ryhl <aliceryhl@...gle.com>
Powered by blists - more mailing lists