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 Reviewed-by: Alice Ryhl Reviewed-by: Benno Lossin Acked-by: Danilo Krummrich Reviewed-by: Alexandre Courbot Signed-off-by: Tamir Duberstein --- drivers/gpu/drm/nova/driver.rs | 10 +++++----- drivers/gpu/nova-core/driver.rs | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/nova/driver.rs b/drivers/gpu/drm/nova/driver.rs index b28b2e05cc15..87480ee8dbae 100644 --- a/drivers/gpu/drm/nova/driver.rs +++ b/drivers/gpu/drm/nova/driver.rs @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 -use kernel::{auxiliary, c_str, device::Core, drm, drm::gem, drm::ioctl, prelude::*, types::ARef}; +use kernel::{auxiliary, device::Core, drm, drm::gem, drm::ioctl, prelude::*, types::ARef}; use crate::file::File; use crate::gem::NovaObject; @@ -22,12 +22,12 @@ pub(crate) struct NovaData { major: 0, minor: 0, patchlevel: 0, - name: c_str!("nova"), - desc: c_str!("Nvidia Graphics"), + name: c"nova", + desc: c"Nvidia Graphics", }; -const NOVA_CORE_MODULE_NAME: &CStr = c_str!("NovaCore"); -const AUXILIARY_NAME: &CStr = c_str!("nova-drm"); +const NOVA_CORE_MODULE_NAME: &CStr = c"NovaCore"; +const AUXILIARY_NAME: &CStr = c"nova-drm"; kernel::auxiliary_device_table!( AUX_TABLE, diff --git a/drivers/gpu/nova-core/driver.rs b/drivers/gpu/nova-core/driver.rs index 274989ea1fb4..2f1a37be3107 100644 --- a/drivers/gpu/nova-core/driver.rs +++ b/drivers/gpu/nova-core/driver.rs @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 -use kernel::{auxiliary, bindings, c_str, device::Core, pci, prelude::*, sizes::SZ_16M, sync::Arc}; +use kernel::{auxiliary, bindings, device::Core, pci, prelude::*, sizes::SZ_16M, sync::Arc}; use crate::gpu::Gpu; @@ -35,7 +35,7 @@ fn probe(pdev: &pci::Device, _info: &Self::IdInfo) -> Result(0, c_str!("nova-core/bar0")), + pdev.iomap_region_sized::(0, c"nova-core/bar0"), GFP_KERNEL, )?; @@ -44,7 +44,7 @@ fn probe(pdev: &pci::Device, _info: &Self::IdInfo) -> Result