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

Tamir Duberstein posted 2 patches 1 month, 2 weeks ago
drivers/net/phy/ax88796b_rust.rs | 7 +++----
drivers/net/phy/qt2025.rs        | 5 ++---
rust/kernel/net/phy.rs           | 6 ++----
3 files changed, 7 insertions(+), 11 deletions(-)
[PATCH 0/2] rust: net: replace `kernel::c_str!` with C-Strings
Posted by Tamir Duberstein 1 month, 2 weeks ago
C-String literals were added in Rust 1.77. Replace instances of
`kernel::c_str!` with C-String literals where possible.

Signed-off-by: Tamir Duberstein <tamird@gmail.com>
---
Tamir Duberstein (2):
      rust: net: replace `kernel::c_str!` with C-Strings
      drivers: net: replace `kernel::c_str!` with C-Strings

 drivers/net/phy/ax88796b_rust.rs | 7 +++----
 drivers/net/phy/qt2025.rs        | 5 ++---
 rust/kernel/net/phy.rs           | 6 ++----
 3 files changed, 7 insertions(+), 11 deletions(-)
---
base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
change-id: 20251222-cstr-net-3bfd7b35acc1

Best regards,
--  
Tamir Duberstein <tamird@gmail.com>
Re: [PATCH 0/2] rust: net: replace `kernel::c_str!` with C-Strings
Posted by Daniel Almeida 1 month, 2 weeks ago

> On 22 Dec 2025, at 09:32, Tamir Duberstein <tamird@kernel.org> wrote:
> 
> C-String literals were added in Rust 1.77. Replace instances of
> `kernel::c_str!` with C-String literals where possible.
> 
> Signed-off-by: Tamir Duberstein <tamird@gmail.com>
> ---
> Tamir Duberstein (2):
>      rust: net: replace `kernel::c_str!` with C-Strings
>      drivers: net: replace `kernel::c_str!` with C-Strings
> 
> drivers/net/phy/ax88796b_rust.rs | 7 +++----
> drivers/net/phy/qt2025.rs        | 5 ++---
> rust/kernel/net/phy.rs           | 6 ++----
> 3 files changed, 7 insertions(+), 11 deletions(-)
> ---
> base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
> change-id: 20251222-cstr-net-3bfd7b35acc1
> 
> Best regards,
> --  
> Tamir Duberstein <tamird@gmail.com>
> 
> 


Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Re: [PATCH 0/2] rust: net: replace `kernel::c_str!` with C-Strings
Posted by FUJITA Tomonori 1 month, 2 weeks ago
On Mon, 22 Dec 2025 13:32:26 +0100
Tamir Duberstein <tamird@kernel.org> wrote:

> C-String literals were added in Rust 1.77. Replace instances of
> `kernel::c_str!` with C-String literals where possible.
> 
> Signed-off-by: Tamir Duberstein <tamird@gmail.com>
> ---
> Tamir Duberstein (2):
>       rust: net: replace `kernel::c_str!` with C-Strings
>       drivers: net: replace `kernel::c_str!` with C-Strings
> 
>  drivers/net/phy/ax88796b_rust.rs | 7 +++----
>  drivers/net/phy/qt2025.rs        | 5 ++---
>  rust/kernel/net/phy.rs           | 6 ++----
>  3 files changed, 7 insertions(+), 11 deletions(-)
> ---
> base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
> change-id: 20251222-cstr-net-3bfd7b35acc1

Reviewed-by: FUJITA Tomonori <fujita.tomonori@gmail.com>