Thread (16 messages) 16 messages, 4 authors, 2025-08-08
STALE315d REVIEWED: 47 (47M)

[PATCH v2 06/10] rust: firmware: use `core::ffi::CStr` method names

From: Tamir Duberstein <hidden>
Date: 2025-07-19 22:42:50
Also in: dri-devel, linux-devicetree, linux-kselftest, linux-pm, lkml, rust-for-linux
Subsystem: firmware loader (request_firmware), rust, the rest · Maintainers: Luis Chamberlain, Russ Weight, Danilo Krummrich, Miguel Ojeda, Linus Torvalds

Prepare for `core::ffi::CStr` taking the place of `kernel::str::CStr` by
avoid methods that only exist on the latter.

Link: https://github.com/Rust-for-Linux/linux/issues/1075
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Benno Lossin <lossin@kernel.org>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Tamir Duberstein <redacted>
---
 rust/kernel/firmware.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rust/kernel/firmware.rs b/rust/kernel/firmware.rs
index be684e860ed2..ca00aa2b4d85 100644
--- a/rust/kernel/firmware.rs
+++ b/rust/kernel/firmware.rs
@@ -291,7 +291,7 @@ const fn push_module_name(self) -> Self {
         let module_name = this.module_name;
 
         if !this.module_name.is_empty() {
-            this = this.push_internal(module_name.as_bytes_with_nul());
+            this = this.push_internal(module_name.to_bytes_with_nul());
 
             if N != 0 {
                 // Re-use the space taken by the NULL terminator and swap it with the '.' separator.
-- 
2.50.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help