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
This commit is contained in:
Tamir Duberstein 2026-01-22 21:46:24 -08:00 committed by Peter Zijlstra
parent ccf9e07011
commit e6de07249e

View file

@ -126,13 +126,12 @@ impl PinnedDrop for LockClassKey {
/// # Examples
///
/// ```
/// use kernel::c_str;
/// use kernel::sync::{static_lock_class, Arc, SpinLock};
///
/// fn new_locked_int() -> Result<Arc<SpinLock<u32>>> {
/// Arc::pin_init(SpinLock::new(
/// 42,
/// c_str!("new_locked_int"),
/// c"new_locked_int",
/// static_lock_class!(),
/// ), GFP_KERNEL)
/// }