Skip to content

driver-core: rust: replace `kernel::c_str!` with C-Strings

Tamir Duberstein lkml rust-for-linux 1 version In review

Get series with b4
b4 am [email protected] change-id 20251222-cstr-driver-core-8bf66543f532

Versions newest first

  1. v1 Latest7 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7rust: auxiliary: replace `kernel::c_str!` with C-Stringssamples/rust/rust_driver_auxiliary.rs+2 -20 replies
2/7rust: device: replace `kernel::c_str!` with C-Stringsrust/kernel/device.rs rust/kernel/device/property.rs+4 -60 replies
3/7rust: platform: replace `kernel::c_str!` with C-Stringsrust/kernel/platform.rs samples/rust/rust_driver_faux.rs samples/rust/rust_driver_platform.rs+19 -210 replies
4/7rust: io: replace `kernel::c_str!` with C-Stringsrust/kernel/io/mem.rs+3 -40 replies
5/7rust: irq: replace `kernel::c_str!` with C-Stringsrust/kernel/irq/request.rs+2 -40 replies
6/7rust: debugfs: replace `kernel::c_str!` with C-Stringsrust/kernel/debugfs.rs+9 -140 replies
7/7samples: rust: debugfs: replace `kernel::c_str!` with C-Stringssamples/rust/rust_debugfs.rs samples/rust/rust_debugfs_scoped.rs+16 -210 replies

Reviews trailers per patch

3 of 7 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchGreg Kroah-HartmanAlice RyhlBenno LossinDanilo KrummrichDaniel Almeida
SeriesR-b
1/7A-b R-b R-b A-b
2/7A-b R-b R-b A-b
3/7A-b R-b R-b A-b
4/7
5/7
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v1 thread

Cover letter [PATCH 0/7] driver-core: rust: replace `kernel::c_str!` with C-Strings

C-String literals were added in Rust 1.77. Replace instances of kernel::c_str! with C-String literals where possible.

---
Tamir Duberstein (7):
rust: auxiliary: replace kernel::c_str! with C-Strings
rust: device: replace kernel::c_str! with C-Strings
rust: platform: replace kernel::c_str! with C-Strings
rust: io: replace kernel::c_str! with C-Strings
rust: irq: replace kernel::c_str! with C-Strings
rust: debugfs: replace kernel::c_str! with C-Strings
samples: rust: debugfs: replace kernel::c_str! with C-Strings

 rust/kernel/debugfs.rs                | 23 +++++++++--------------
 rust/kernel/device.rs                 |  4 +---
 rust/kernel/device/property.rs        |  6 +++---
 rust/kernel/io/mem.rs                 |  7 +++----
 rust/kernel/irq/request.rs            |  6 ++----
 rust/kernel/platform.rs               |  6 +++---
 samples/rust/rust_debugfs.rs          | 17 ++++++++---------
 samples/rust/rust_debugfs_scoped.rs   | 20 ++++++++------------
 samples/rust/rust_driver_auxiliary.rs |  4 ++--
 samples/rust/rust_driver_faux.rs      |  4 ++--
 samples/rust/rust_driver_platform.rs  | 30 ++++++++++++++----------------
 11 files changed, 55 insertions(+), 72 deletions(-)

---
base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
change-id: 20251222-cstr-driver-core-8bf66543f532

Best regards,

Signature · 1 line
Tamir Duberstein <[email protected]>