mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:24:47 +01:00
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:
parent
ccf9e07011
commit
e6de07249e
1 changed files with 1 additions and 2 deletions
|
|
@ -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)
|
||||
/// }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue