Re: [PATCH v2] rust: update `kernel::c_str!` documentation

From: Gary Guo

Date: Tue Mar 10 2026 - 18:39:59 EST


On Mon Mar 9, 2026 at 5:01 PM GMT, Tamir Duberstein wrote:
> Now that all literals are C-Strings, update the documentation to explain
> that use of this macro should be limited to non-literal strings.
>
> Link: https://github.com/Rust-for-Linux/linux/issues/1075
> Acked-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
> Signed-off-by: Tamir Duberstein <tamird@xxxxxxxxxx>

Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>

> ---
> This patch completes the work of replacing our custom `CStr` with
> upstream's.
> ---
> Changes in v2:
> - Drop rename, keep only documentation update. (Gary Guo)
> - Add example of misuse to documentation. (Gary Guo)
> - Link to v1: https://patch.msgid.link/20260302-cstr-rename-macro-v1-1-a269fe4dc3f0@xxxxxxxxxx
> ---
> rust/kernel/str.rs | 19 ++++++++++++++++---
> 1 file changed, 16 insertions(+), 3 deletions(-)