mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
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>
This commit is contained in:
committed by
Danilo Krummrich
parent
0250ea325c
commit
644672e93a
@@ -139,7 +139,6 @@ impl<'a> IrqRequest<'a> {
|
||||
/// [`Completion::wait_for_completion()`]: kernel::sync::Completion::wait_for_completion
|
||||
///
|
||||
/// ```
|
||||
/// use kernel::c_str;
|
||||
/// use kernel::device::{Bound, Device};
|
||||
/// use kernel::irq::{self, Flags, IrqRequest, IrqReturn, Registration};
|
||||
/// use kernel::prelude::*;
|
||||
@@ -167,7 +166,7 @@ impl<'a> IrqRequest<'a> {
|
||||
/// handler: impl PinInit<Data, Error>,
|
||||
/// request: IrqRequest<'_>,
|
||||
/// ) -> Result<Arc<Registration<Data>>> {
|
||||
/// let registration = Registration::new(request, Flags::SHARED, c_str!("my_device"), handler);
|
||||
/// let registration = Registration::new(request, Flags::SHARED, c"my_device", handler);
|
||||
///
|
||||
/// let registration = Arc::pin_init(registration, GFP_KERNEL)?;
|
||||
///
|
||||
@@ -340,7 +339,6 @@ impl<T: ?Sized + ThreadedHandler, A: Allocator> ThreadedHandler for Box<T, A> {
|
||||
/// [`Mutex`](kernel::sync::Mutex) to provide interior mutability.
|
||||
///
|
||||
/// ```
|
||||
/// use kernel::c_str;
|
||||
/// use kernel::device::{Bound, Device};
|
||||
/// use kernel::irq::{
|
||||
/// self, Flags, IrqRequest, IrqReturn, ThreadedHandler, ThreadedIrqReturn,
|
||||
@@ -381,7 +379,7 @@ impl<T: ?Sized + ThreadedHandler, A: Allocator> ThreadedHandler for Box<T, A> {
|
||||
/// request: IrqRequest<'_>,
|
||||
/// ) -> Result<Arc<ThreadedRegistration<Data>>> {
|
||||
/// let registration =
|
||||
/// ThreadedRegistration::new(request, Flags::SHARED, c_str!("my_device"), handler);
|
||||
/// ThreadedRegistration::new(request, Flags::SHARED, c"my_device", handler);
|
||||
///
|
||||
/// let registration = Arc::pin_init(registration, GFP_KERNEL)?;
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user