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: irq: 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@gmail.com>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Link: https://patch.msgid.link/20251222-cstr-driver-core-v1-5-1142a177d0fd@gmail.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>

authored by

Tamir Duberstein and committed by
Danilo Krummrich
644672e9 0250ea32

+2 -4
+2 -4
rust/kernel/irq/request.rs
··· 139 139 /// [`Completion::wait_for_completion()`]: kernel::sync::Completion::wait_for_completion 140 140 /// 141 141 /// ``` 142 - /// use kernel::c_str; 143 142 /// use kernel::device::{Bound, Device}; 144 143 /// use kernel::irq::{self, Flags, IrqRequest, IrqReturn, Registration}; 145 144 /// use kernel::prelude::*; ··· 166 167 /// handler: impl PinInit<Data, Error>, 167 168 /// request: IrqRequest<'_>, 168 169 /// ) -> Result<Arc<Registration<Data>>> { 169 - /// let registration = Registration::new(request, Flags::SHARED, c_str!("my_device"), handler); 170 + /// let registration = Registration::new(request, Flags::SHARED, c"my_device", handler); 170 171 /// 171 172 /// let registration = Arc::pin_init(registration, GFP_KERNEL)?; 172 173 /// ··· 339 340 /// [`Mutex`](kernel::sync::Mutex) to provide interior mutability. 340 341 /// 341 342 /// ``` 342 - /// use kernel::c_str; 343 343 /// use kernel::device::{Bound, Device}; 344 344 /// use kernel::irq::{ 345 345 /// self, Flags, IrqRequest, IrqReturn, ThreadedHandler, ThreadedIrqReturn, ··· 379 381 /// request: IrqRequest<'_>, 380 382 /// ) -> Result<Arc<ThreadedRegistration<Data>>> { 381 383 /// let registration = 382 - /// ThreadedRegistration::new(request, Flags::SHARED, c_str!("my_device"), handler); 384 + /// ThreadedRegistration::new(request, Flags::SHARED, c"my_device", handler); 383 385 /// 384 386 /// let registration = Arc::pin_init(registration, GFP_KERNEL)?; 385 387 ///