diff options
| author | Tamir Duberstein <tamird@gmail.com> | 2025-12-22 13:35:29 +0100 |
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2025-12-22 17:30:29 +0100 |
| commit | 1114c87e49642165a224c28ceaa333e8504ff122 (patch) | |
| tree | 6a5773fb5d04b5cbc81ea45cbbb18588c03a4d91 /rust/kernel | |
| parent | f0c6ea853bd7f48aeec231e9378fc17cf36b9109 (diff) | |
rust: platform: 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.
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Benno Lossin <lossin@kernel.org>
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-3-1142a177d0fd@gmail.com
[ Use kernel vertical import style; discard unrelated faux changes.
- Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'rust/kernel')
| -rw-r--r-- | rust/kernel/platform.rs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/rust/kernel/platform.rs b/rust/kernel/platform.rs index ed889f079cab..bddb593cee7b 100644 --- a/rust/kernel/platform.rs +++ b/rust/kernel/platform.rs @@ -137,8 +137,13 @@ macro_rules! module_platform_driver { /// # Examples /// ///``` -/// # use kernel::{acpi, bindings, c_str, device::Core, of, platform}; -/// +/// # use kernel::{ +/// # acpi, +/// # bindings, +/// # device::Core, +/// # of, +/// # platform, +/// # }; /// struct MyDriver; /// /// kernel::of_device_table!( @@ -146,7 +151,7 @@ macro_rules! module_platform_driver { /// MODULE_OF_TABLE, /// <MyDriver as platform::Driver>::IdInfo, /// [ -/// (of::DeviceId::new(c_str!("test,device")), ()) +/// (of::DeviceId::new(c"test,device"), ()) /// ] /// ); /// @@ -155,7 +160,7 @@ macro_rules! module_platform_driver { /// MODULE_ACPI_TABLE, /// <MyDriver as platform::Driver>::IdInfo, /// [ -/// (acpi::DeviceId::new(c_str!("LNUXBEEF")), ()) +/// (acpi::DeviceId::new(c"LNUXBEEF"), ()) /// ] /// ); /// |
