Skip to contentSkip to conversation

gpu: nova-core: remove imports available from prelude

PATCH Applied Gary Guo 3 participants 4 messages Jun 10

Subsystems (5)
lore
Share & tools
lore

Gary Guo

author
#0 lore raw

PATCH 1/2 gpu: nova-core: remove imports available from prelude

From: Gary Guo <[email protected]>

No functional changes intended.

---
 drivers/gpu/nova-core/firmware.rs                  | 4 +---
 drivers/gpu/nova-core/firmware/fwsec/bootloader.rs | 1 -
 2 files changed, 1 insertion(+), 4 deletions(-)
drivers/gpu/nova-core/firmware.rs +1 -3
index 366d3b76360e..f74e0f16c65c 100644
@@ -467,11 +467,9 @@ pub(crate) const fn create(
 /// that scheme before nova-core becomes stable, which means this module will eventually be
 /// removed.
 mod elf {
-    use core::mem::size_of;
-
     use kernel::{
         bindings,
-        str::CStr,
+        prelude::*,
         transmute::FromBytes, //
     };
 
drivers/gpu/nova-core/firmware/fwsec/bootloader.rs +0 -1
index 039920dc340b..ac1558a83b83 100644
@@ -7,7 +7,6 @@
 //! be loaded using PIO.
 
 use kernel::{
-    alloc::KVec,
     device::{
         self,
         Device, //

base-commit: 58f0f62778faf667bdaf1fa7db59e89847213646

Signature · 1 line
2.54.0
author
#1 lore raw

PATCH 2/2 gpu: nova-core: use `c"literal"` instead of `c_str!()`

From: Gary Guo <[email protected]>

No functional changes intended.

---
 drivers/gpu/nova-core/nova_core.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/nova-core/nova_core.rs +1 -1
index 9f0199f7b38c..735b8e17c6b6 100644
@@ -54,7 +54,7 @@ struct NovaCoreModule {
 
 impl InPlaceModule for NovaCoreModule {
     fn init(module: &'static kernel::ThisModule) -> impl PinInit<Self, Error> {
-        let dir = debugfs::Dir::new(kernel::c_str!("nova-core"));
+        let dir = debugfs::Dir::new(c"nova-core");
 
         // SAFETY: We are the only driver code running during init, so there
         // cannot be any concurrent access to `DEBUGFS_ROOT`.
Signature · 1 line
2.54.0
maintainer Applied
#3 lore raw
In reply to Gary Guo
Quoted 1 line · Gary Guo

[PATCH 1/2] gpu: nova-core: remove imports available from prelude

Applied, thanks!

Branch: drm-rust-next
Tree: https://gitlab.freedesktop.org/drm/rust/kernel.git

[1/2] gpu: nova-core: remove imports available from prelude

      commit: e453072df254
[2/2] gpu: nova-core: use `c"literal"` instead of `c_str!()`
      commit: 550dc7536644

The patches will appear in the next linux-next integration (typically within 24 hours on weekdays).

The patches are queued up for the upcoming merge window for the next major kernel release.