rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] Replace `kernel::str::CStr` with `core::ffi::CStr` (cycle 1)
@ 2025-07-04 20:14 Tamir Duberstein
  2025-07-04 20:14 ` [PATCH 1/6] rust: kernel: remove `fmt!`, fix clippy::uninlined-format-args Tamir Duberstein
                   ` (7 more replies)
  0 siblings, 8 replies; 23+ messages in thread
From: Tamir Duberstein @ 2025-07-04 20:14 UTC (permalink / raw)
  To: Rafael J. Wysocki, Viresh Kumar, Danilo Krummrich, David Airlie,
	Simona Vetter, Nishanth Menon, Stephen Boyd, Miguel Ojeda,
	Alex Gaynor, Boqun Feng, Gary Guo, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross
  Cc: linux-pm, linux-kernel, nouveau, dri-devel, rust-for-linux,
	Tamir Duberstein

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@gmail.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@gmail.com>


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2025-07-21 12:54 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-04 20:14 [PATCH 0/6] Replace `kernel::str::CStr` with `core::ffi::CStr` (cycle 1) Tamir Duberstein
2025-07-04 20:14 ` [PATCH 1/6] rust: kernel: remove `fmt!`, fix clippy::uninlined-format-args Tamir Duberstein
2025-07-04 20:56   ` Benno Lossin
2025-07-20 21:24   ` Miguel Ojeda
2025-07-20 22:37     ` Danilo Krummrich
2025-07-20 23:03   ` Tamir Duberstein
2025-07-20 23:17     ` Miguel Ojeda
2025-07-20 23:18       ` Tamir Duberstein
2025-07-21  7:37   ` Viresh Kumar
2025-07-21 12:54     ` Miguel Ojeda
2025-07-04 20:14 ` [PATCH 2/6] rust: kernel: add `fmt` module Tamir Duberstein
2025-07-04 22:38   ` Benno Lossin
2025-07-04 20:14 ` [PATCH 3/6] rust: use `kernel::{fmt,prelude::fmt!}` Tamir Duberstein
2025-07-05  9:23   ` Benno Lossin
2025-07-04 20:14 ` [PATCH 4/6] rust: str: remove unnecessary qualification Tamir Duberstein
2025-07-05  8:04   ` Benno Lossin
2025-07-05  8:35   ` Alice Ryhl
2025-07-04 20:14 ` [PATCH 5/6] rust: add `CStr` methods matching `core::ffi::CStr` Tamir Duberstein
2025-07-05  9:15   ` Benno Lossin
2025-07-04 20:14 ` [PATCH 6/6] rust: use `core::ffi::CStr` method names Tamir Duberstein
2025-07-05  9:16   ` Benno Lossin
2025-07-10 13:20 ` [PATCH 0/6] Replace `kernel::str::CStr` with `core::ffi::CStr` (cycle 1) Alice Ryhl
2025-07-20 22:57 ` Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).