Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rust: sync: 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.

Signed-off-by: Tamir Duberstein <tamird@kernel.org>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260120-cstr-sync-again-v1-1-2a775a2a36fd@kernel.org
Link: https://patch.msgid.link/20260123054624.8226-2-boqun.feng@gmail.com

authored by

Tamir Duberstein and committed by
Peter Zijlstra
e6de0724 ccf9e070

+1 -2
+1 -2
rust/kernel/sync.rs
··· 126 126 /// # Examples 127 127 /// 128 128 /// ``` 129 - /// use kernel::c_str; 130 129 /// use kernel::sync::{static_lock_class, Arc, SpinLock}; 131 130 /// 132 131 /// fn new_locked_int() -> Result<Arc<SpinLock<u32>>> { 133 132 /// Arc::pin_init(SpinLock::new( 134 133 /// 42, 135 - /// c_str!("new_locked_int"), 134 + /// c"new_locked_int", 136 135 /// static_lock_class!(), 137 136 /// ), GFP_KERNEL) 138 137 /// }