From: Gary Guo <gary@garyguo.net>
To: "Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Alexandre Courbot" <acourbot@nvidia.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Daniel del Castillo" <delcastillodelarosadaniel@gmail.com>,
"Joel Fernandes" <joelagnelf@nvidia.com>,
"John Hubbard" <jhubbard@nvidia.com>,
"Alistair Popple" <apopple@nvidia.com>,
"Lyude Paul" <lyude@redhat.com>, "Timur Tabi" <ttabi@nvidia.com>,
"Shankari Anand" <shankari.ak0208@gmail.com>
Cc: rust-for-linux@vger.kernel.org, nouveau@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] gpu: nova-core: remove imports available via prelude
Date: Fri, 23 Jan 2026 17:19:40 +0000 [thread overview]
Message-ID: <20260123172007.136873-2-gary@garyguo.net> (raw)
In-Reply-To: <20260123172007.136873-1-gary@garyguo.net>
These imports are already in scope by importing `kernel::prelude::*` and
does not need to be imported separately.
Signed-off-by: Gary Guo <gary@garyguo.net>
---
drivers/gpu/nova-core/firmware/fwsec.rs | 1 -
drivers/gpu/nova-core/firmware/gsp.rs | 12 +++++-------
drivers/gpu/nova-core/firmware/riscv.rs | 2 --
drivers/gpu/nova-core/gsp/sequencer.rs | 8 +-------
drivers/gpu/nova-core/sbuffer.rs | 5 +----
5 files changed, 7 insertions(+), 21 deletions(-)
diff --git a/drivers/gpu/nova-core/firmware/fwsec.rs b/drivers/gpu/nova-core/firmware/fwsec.rs
index b28e34d279f4..dd2d1f0f24ed 100644
--- a/drivers/gpu/nova-core/firmware/fwsec.rs
+++ b/drivers/gpu/nova-core/firmware/fwsec.rs
@@ -12,7 +12,6 @@
use core::{
marker::PhantomData,
- mem::size_of,
ops::Deref, //
};
diff --git a/drivers/gpu/nova-core/firmware/gsp.rs b/drivers/gpu/nova-core/firmware/gsp.rs
index 1025b7f746eb..f0f18166849e 100644
--- a/drivers/gpu/nova-core/firmware/gsp.rs
+++ b/drivers/gpu/nova-core/firmware/gsp.rs
@@ -1,7 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
-use core::mem::size_of_val;
-
use kernel::{
device,
dma::{
@@ -34,11 +32,11 @@
/// 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;
- use kernel::str::CStr;
- use kernel::transmute::FromBytes;
+ use kernel::{
+ bindings,
+ prelude::*,
+ transmute::FromBytes, //
+ };
/// Newtype to provide a [`FromBytes`] implementation.
#[repr(transparent)]
diff --git a/drivers/gpu/nova-core/firmware/riscv.rs b/drivers/gpu/nova-core/firmware/riscv.rs
index 28dfef63657a..4bdd89bd0757 100644
--- a/drivers/gpu/nova-core/firmware/riscv.rs
+++ b/drivers/gpu/nova-core/firmware/riscv.rs
@@ -3,8 +3,6 @@
//! Support for firmware binaries designed to run on a RISC-V core. Such firmwares files have a
//! dedicated header.
-use core::mem::size_of;
-
use kernel::{
device,
firmware::Firmware,
diff --git a/drivers/gpu/nova-core/gsp/sequencer.rs b/drivers/gpu/nova-core/gsp/sequencer.rs
index d6c489c39092..c31b245acea3 100644
--- a/drivers/gpu/nova-core/gsp/sequencer.rs
+++ b/drivers/gpu/nova-core/gsp/sequencer.rs
@@ -2,13 +2,7 @@
//! GSP Sequencer implementation for Pre-hopper GSP boot sequence.
-use core::{
- array,
- mem::{
- size_of,
- size_of_val, //
- },
-};
+use core::array;
use kernel::{
device,
diff --git a/drivers/gpu/nova-core/sbuffer.rs b/drivers/gpu/nova-core/sbuffer.rs
index 64758b7fae56..3a41d224c77a 100644
--- a/drivers/gpu/nova-core/sbuffer.rs
+++ b/drivers/gpu/nova-core/sbuffer.rs
@@ -2,10 +2,7 @@
use core::ops::Deref;
-use kernel::{
- alloc::KVec,
- prelude::*, //
-};
+use kernel::prelude::*;
/// A buffer abstraction for discontiguous byte slices.
///
--
2.51.2
next prev parent reply other threads:[~2026-01-23 17:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-23 17:19 [PATCH 0/3] Remove redundant imports of items re-exported from prelude Gary Guo
2026-01-23 17:19 ` Gary Guo [this message]
2026-01-25 21:17 ` [PATCH 1/3] gpu: nova-core: remove imports available via prelude Danilo Krummrich
2026-01-27 11:30 ` Danilo Krummrich
2026-01-27 11:44 ` Miguel Ojeda
2026-01-30 4:42 ` Miguel Ojeda
2026-01-23 17:19 ` [PATCH 2/3] block: rnull: " Gary Guo
2026-01-26 18:27 ` Andreas Hindborg
2026-01-26 18:37 ` Miguel Ojeda
2026-01-27 12:51 ` Andreas Hindborg
2026-01-23 17:19 ` [PATCH 3/3] samples: rust: " Gary Guo
2026-01-25 21:17 ` Danilo Krummrich
2026-01-26 9:23 ` Alice Ryhl
2026-01-26 15:02 ` Miguel Ojeda
2026-01-26 16:04 ` Greg Kroah-Hartman
2026-01-27 11:10 ` Miguel Ojeda
2026-01-30 12:45 ` Dirk Behme
2026-01-30 14:24 ` Gary Guo
2026-01-25 21:07 ` [PATCH 0/3] Remove redundant imports of items re-exported from prelude Miguel Ojeda
2026-01-27 16:45 ` (subset) " Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260123172007.136873-2-gary@garyguo.net \
--to=gary@garyguo.net \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=apopple@nvidia.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=delcastillodelarosadaniel@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jhubbard@nvidia.com \
--cc=joelagnelf@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=lyude@redhat.com \
--cc=nouveau@lists.freedesktop.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=shankari.ak0208@gmail.com \
--cc=simona@ffwll.ch \
--cc=tmgross@umich.edu \
--cc=ttabi@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox