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

Tamir Duberstein posted 6 patches 1 month ago
rust/kernel/firmware.rs        |  6 ++---
rust/kernel/net/phy.rs         |  6 ++---
rust/kernel/str.rs             | 57 +++++++++++++++++++++---------------------
rust/kernel/sync.rs            |  5 ++--
rust/kernel/sync/completion.rs |  2 +-
rust/kernel/workqueue.rs       |  8 +++---
rust/macros/module.rs          |  2 +-
7 files changed, 41 insertions(+), 45 deletions(-)
[PATCH v3 0/6] rust: replace `kernel::c_str!` with C-Strings
Posted by Tamir Duberstein 1 month ago
This intentionally includes only those changes that can be taken through
the Rust tree. I will send separate patches after rc1 for the remaining
changes.

Signed-off-by: Tamir Duberstein <tamird@gmail.com>
---
Changes in v3:
- Include all patches that can be taken through the rust tree.
- Split "sync" patch into "sync" and "workqueue". Kept the tags on both.
- Link to v2: https://lore.kernel.org/r/20250925-core-cstr-cstrings-v2-0-78e0aaace1cd@gmail.com

Changes in v2:
- Rebase.
- Add two patches to address new code.
- Drop incorrectly applied Acked-by tags from Danilo.
- Link to v1: https://lore.kernel.org/r/20250710-core-cstr-cstrings-v1-0-027420ea799e@gmail.com

---
Tamir Duberstein (6):
      rust: firmware: replace `kernel::c_str!` with C-Strings
      rust: net: replace `kernel::c_str!` with C-Strings
      rust: str: replace `kernel::c_str!` with C-Strings
      rust: sync: replace `kernel::c_str!` with C-Strings
      rust: workqueue: replace `kernel::c_str!` with C-Strings
      rust: macros: replace `kernel::c_str!` with C-Strings

 rust/kernel/firmware.rs        |  6 ++---
 rust/kernel/net/phy.rs         |  6 ++---
 rust/kernel/str.rs             | 57 +++++++++++++++++++++---------------------
 rust/kernel/sync.rs            |  5 ++--
 rust/kernel/sync/completion.rs |  2 +-
 rust/kernel/workqueue.rs       |  8 +++---
 rust/macros/module.rs          |  2 +-
 7 files changed, 41 insertions(+), 45 deletions(-)
---
base-commit: 5935461b458463ee51aac8d95c25d7a5e1de8c4d
change-id: 20250710-core-cstr-cstrings-1faaa632f0fd

Best regards,
--  
Tamir Duberstein <tamird@gmail.com>
Re: [PATCH v3 0/6] rust: replace `kernel::c_str!` with C-Strings
Posted by Miguel Ojeda 3 weeks, 5 days ago
On Thu, Nov 13, 2025 at 11:58 PM Tamir Duberstein <tamird@kernel.org> wrote:
>
>       rust: firmware: replace `kernel::c_str!` with C-Strings
>       rust: str: replace `kernel::c_str!` with C-Strings
>       rust: macros: replace `kernel::c_str!` with C-Strings

Applied (these three only) to `rust-next` -- thanks everyone!

    [ Removed unused `c_str` import in doctest. - Miguel ]

Given how many transformations there were, perhaps the Reviewed-by's
should have been reset at some point, but given they are simple
patches and you carried them and nobody complained, I kept them.

Cheers,
Miguel