Skip to content

Commit e6de072

Browse files
tamirdPeter Zijlstra
authored andcommitted
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
1 parent ccf9e07 commit e6de072

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

rust/kernel/sync.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,12 @@ impl PinnedDrop for LockClassKey {
126126
/// # Examples
127127
///
128128
/// ```
129-
/// use kernel::c_str;
130129
/// use kernel::sync::{static_lock_class, Arc, SpinLock};
131130
///
132131
/// fn new_locked_int() -> Result<Arc<SpinLock<u32>>> {
133132
/// Arc::pin_init(SpinLock::new(
134133
/// 42,
135-
/// c_str!("new_locked_int"),
134+
/// c"new_locked_int",
136135
/// static_lock_class!(),
137136
/// ), GFP_KERNEL)
138137
/// }

0 commit comments

Comments
 (0)