From: Lyude Paul <lyude@redhat.com>
To: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
rust-for-linux@vger.kernel.org,
Danilo Krummrich <dakr@kernel.org>
Cc: "Ewan Chorynski" <ewan.chorynski@ik.me>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Shankari Anand" <shankari.ak0208@gmail.com>,
"David Airlie" <airlied@gmail.com>,
"Asahi Lina" <lina+kernel@asahilina.net>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Lyude Paul" <lyude@redhat.com>
Subject: [PATCH v2 2/2] rust/drm: Remove imports covered by prelude::*
Date: Thu, 22 Jan 2026 16:43:03 -0500 [thread overview]
Message-ID: <20260122214316.3281257-2-lyude@redhat.com> (raw)
In-Reply-To: <20260122214316.3281257-1-lyude@redhat.com>
This just removes any explicit imports of items in files that are already
being pulled in by `use prelude::*;`.
There should be no functional changes in this patch.
Signed-off-by: Lyude Paul <lyude@redhat.com>
---
rust/kernel/drm/device.rs | 5 +----
rust/kernel/drm/driver.rs | 10 +++-------
rust/kernel/drm/file.rs | 6 +-----
rust/kernel/drm/gem/mod.rs | 6 +-----
4 files changed, 6 insertions(+), 21 deletions(-)
diff --git a/rust/kernel/drm/device.rs b/rust/kernel/drm/device.rs
index 23c457c90a6ab..30116d78cabe0 100644
--- a/rust/kernel/drm/device.rs
+++ b/rust/kernel/drm/device.rs
@@ -12,10 +12,7 @@
self,
driver::AllocImpl, //
},
- error::{
- from_err_ptr,
- Result, //
- },
+ error::from_err_ptr,
prelude::*,
sync::aref::{
ARef,
diff --git a/rust/kernel/drm/driver.rs b/rust/kernel/drm/driver.rs
index c8ec5c0819a06..2940fece7d59e 100644
--- a/rust/kernel/drm/driver.rs
+++ b/rust/kernel/drm/driver.rs
@@ -8,15 +8,11 @@
bindings,
device,
devres,
- drm, //
- error::{
- to_result,
- Result, //
- },
+ drm,
+ error::to_result,
prelude::*,
- sync::aref::ARef,
+ sync::aref::ARef, //
};
-use macros::vtable;
/// Driver use the GEM memory manager. This should be set for all modern drivers.
pub(crate) const FEAT_GEM: u32 = bindings::drm_driver_feature_DRIVER_GEM;
diff --git a/rust/kernel/drm/file.rs b/rust/kernel/drm/file.rs
index 7dade6dfa1ba2..10160601ce5af 100644
--- a/rust/kernel/drm/file.rs
+++ b/rust/kernel/drm/file.rs
@@ -7,14 +7,10 @@
use crate::{
bindings,
drm,
- error::Result,
prelude::*,
types::Opaque, //
};
-use core::{
- marker::PhantomData,
- pin::Pin, //
-};
+use core::marker::PhantomData;
/// Trait that must be implemented by DRM drivers to represent a DRM File (a client instance).
pub trait DriverFile {
diff --git a/rust/kernel/drm/gem/mod.rs b/rust/kernel/drm/gem/mod.rs
index 56b7641b1405e..b4199945db378 100644
--- a/rust/kernel/drm/gem/mod.rs
+++ b/rust/kernel/drm/gem/mod.rs
@@ -5,7 +5,6 @@
//! C header: [`include/drm/drm_gem.h`](srctree/include/drm/drm_gem.h)
use crate::{
- alloc::flags::*,
bindings,
drm::{
self,
@@ -14,10 +13,7 @@
AllocOps, //
},
},
- error::{
- to_result,
- Result, //
- },
+ error::to_result,
prelude::*,
sync::aref::{
ARef,
--
2.52.0
next prev parent reply other threads:[~2026-01-22 21:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-22 21:43 [PATCH v2 1/2] rust/drm: Fixup import styles Lyude Paul
2026-01-22 21:43 ` Lyude Paul [this message]
2026-02-24 15:17 ` [PATCH v2 2/2] rust/drm: Remove imports covered by prelude::* Danilo Krummrich
2026-01-22 23:04 ` [PATCH v2 1/2] rust/drm: Fixup import styles Gary Guo
2026-02-24 15:17 ` Danilo Krummrich
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=20260122214316.3281257-2-lyude@redhat.com \
--to=lyude@redhat.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=ewan.chorynski@ik.me \
--cc=lina+kernel@asahilina.net \
--cc=linux-kernel@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=shankari.ak0208@gmail.com \
--cc=simona@ffwll.ch \
/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