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 Acked-by: Danilo Krummrich dakr@kernel.org Signed-off-by: Tamir Duberstein tamird@gmail.com --- samples/rust/rust_driver_pci.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/samples/rust/rust_driver_pci.rs b/samples/rust/rust_driver_pci.rs index 606946ff4d7f..e0e9d9fda484 100644 --- a/samples/rust/rust_driver_pci.rs +++ b/samples/rust/rust_driver_pci.rs @@ -4,7 +4,7 @@ //! //! To make this driver probe, QEMU must be run with `-device pci-testdev`.
-use kernel::{bindings, c_str, device::Core, devres::Devres, pci, prelude::*, types::ARef}; +use kernel::{bindings, device::Core, devres::Devres, pci, prelude::*, types::ARef};
struct Regs;
@@ -79,7 +79,7 @@ fn probe(pdev: &pci::Device<Core>, info: &Self::IdInfo) -> Result<Pin<KBox<Self> let drvdata = KBox::pin_init( try_pin_init!(Self { pdev: pdev.into(), - bar <- pdev.iomap_region_sized::<{ Regs::END }>(0, c_str!("rust_driver_pci")), + bar <- pdev.iomap_region_sized::<{ Regs::END }>(0, c"rust_driver_pci"), index: *info, }), GFP_KERNEL,