diff options
| author | Tamir Duberstein <tamird@kernel.org> | 2026-01-22 21:46:24 -0800 |
|---|---|---|
| committer | Peter Zijlstra <peterz@infradead.org> | 2026-01-28 09:25:44 +0100 |
| commit | e6de07249ef381b674f0d65adf9defcdab76b768 (patch) | |
| tree | 9f65d2c24ad2b48882dfb841b230ee0c42f3b9ca /rust/kernel | |
| parent | ccf9e070116a81d29aae30db501d562c8efd1ed8 (diff) | |
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
Diffstat (limited to 'rust/kernel')
| -rw-r--r-- | rust/kernel/sync.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/rust/kernel/sync.rs b/rust/kernel/sync.rs index b10e576221ff..993dbf2caa0e 100644 --- a/rust/kernel/sync.rs +++ b/rust/kernel/sync.rs @@ -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) /// } |
