gpu: nova: 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> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Tamir Duberstein <tamird@gmail.com> Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com> Link: https://patch.msgid.link/20251222-cstr-nova-v1-1-0e2353d5debe@gmail.com [ Use 'nova' commit subject prefix; use kernel vertical import style. - Danilo ] Signed-off-by: Danilo Krummrich <dakr@kernel.org>master
parent
97cf6bc0ab
commit
ee47c0ab23
|
|
@ -1,7 +1,15 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
use kernel::{
|
||||
auxiliary, c_str, device::Core, drm, drm::gem, drm::ioctl, prelude::*, sync::aref::ARef,
|
||||
auxiliary,
|
||||
device::Core,
|
||||
drm::{
|
||||
self,
|
||||
gem,
|
||||
ioctl, //
|
||||
},
|
||||
prelude::*,
|
||||
sync::aref::ARef, //
|
||||
};
|
||||
|
||||
use crate::file::File;
|
||||
|
|
@ -24,12 +32,12 @@ const INFO: drm::DriverInfo = drm::DriverInfo {
|
|||
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,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
use kernel::{
|
||||
auxiliary,
|
||||
c_str,
|
||||
device::Core,
|
||||
devres::Devres,
|
||||
dma::Device,
|
||||
|
|
@ -82,7 +81,7 @@ impl pci::Driver for NovaCore {
|
|||
unsafe { pdev.dma_set_mask_and_coherent(DmaMask::new::<GPU_DMA_BITS>())? };
|
||||
|
||||
let bar = Arc::pin_init(
|
||||
pdev.iomap_region_sized::<BAR0_SIZE>(0, c_str!("nova-core/bar0")),
|
||||
pdev.iomap_region_sized::<BAR0_SIZE>(0, c"nova-core/bar0"),
|
||||
GFP_KERNEL,
|
||||
)?;
|
||||
|
||||
|
|
@ -90,7 +89,7 @@ impl pci::Driver for NovaCore {
|
|||
gpu <- Gpu::new(pdev, bar.clone(), bar.access(pdev.as_ref())?),
|
||||
_reg <- auxiliary::Registration::new(
|
||||
pdev.as_ref(),
|
||||
c_str!("nova-drm"),
|
||||
c"nova-drm",
|
||||
0, // TODO[XARR]: Once it lands, use XArray; for now we don't use the ID.
|
||||
crate::MODULE_NAME
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in New Issue