summaryrefslogtreecommitdiff
path: root/rust/kernel
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@gmail.com>2025-12-22 13:18:57 +0100
committerChristian Brauner <brauner@kernel.org>2026-01-29 15:32:40 +0100
commit40210c2b11a873ff64a812c2d2600f529f01a83e (patch)
tree0d750c9f21d71e0806323699526ce63d1b72e55c /rust/kernel
parentfd5d8b65cfe76db197dce5fde184fd310fb4a26d (diff)
rust: seq_file: 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. Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Benno Lossin <lossin@kernel.org> Signed-off-by: Tamir Duberstein <tamird@gmail.com> Link: https://patch.msgid.link/20251222-cstr-vfs-v1-1-18e3d327cbd7@gmail.com Acked-by: Danilo Krummrich <dakr@kernel.org> Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'rust/kernel')
-rw-r--r--rust/kernel/seq_file.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/kernel/seq_file.rs b/rust/kernel/seq_file.rs
index 855e533813a6..518265558d66 100644
--- a/rust/kernel/seq_file.rs
+++ b/rust/kernel/seq_file.rs
@@ -4,7 +4,7 @@
//!
//! C header: [`include/linux/seq_file.h`](srctree/include/linux/seq_file.h)
-use crate::{bindings, c_str, fmt, str::CStrExt as _, types::NotThreadSafe, types::Opaque};
+use crate::{bindings, fmt, str::CStrExt as _, types::NotThreadSafe, types::Opaque};
/// A utility for generating the contents of a seq file.
#[repr(transparent)]
@@ -36,7 +36,7 @@ impl SeqFile {
unsafe {
bindings::seq_printf(
self.inner.get(),
- c_str!("%pA").as_char_ptr(),
+ c"%pA".as_char_ptr(),
core::ptr::from_ref(&args).cast::<crate::ffi::c_void>(),
);
}