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>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Dave Ertman" <david.m.ertman@intel.com>,
"Ira Weiny" <ira.weiny@intel.com>,
"Leon Romanovsky" <leon@kernel.org>,
"Arnd Bergmann" <arnd@arndb.de>
Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] samples: rust: remove imports available via prelude
Date: Fri, 23 Jan 2026 17:19:42 +0000 [thread overview]
Message-ID: <20260123172007.136873-4-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>
---
samples/rust/rust_driver_auxiliary.rs | 1 -
samples/rust/rust_misc_device.rs | 2 --
samples/rust/rust_print_main.rs | 2 +-
3 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/samples/rust/rust_driver_auxiliary.rs b/samples/rust/rust_driver_auxiliary.rs
index f148124fe81f..84c2b1045701 100644
--- a/samples/rust/rust_driver_auxiliary.rs
+++ b/samples/rust/rust_driver_auxiliary.rs
@@ -18,7 +18,6 @@
};
use core::any::TypeId;
-use pin_init::PinInit;
const MODULE_NAME: &CStr = <LocalModule as kernel::ModuleMetadata>::NAME;
const AUXILIARY_NAME: &CStr = c"auxiliary";
diff --git a/samples/rust/rust_misc_device.rs b/samples/rust/rust_misc_device.rs
index 49dd5814e1ab..87a1fe63533a 100644
--- a/samples/rust/rust_misc_device.rs
+++ b/samples/rust/rust_misc_device.rs
@@ -95,8 +95,6 @@
//! }
//! ```
-use core::pin::Pin;
-
use kernel::{
device::Device,
fs::{File, Kiocb},
diff --git a/samples/rust/rust_print_main.rs b/samples/rust/rust_print_main.rs
index 4095c72afeab..682207c81fc2 100644
--- a/samples/rust/rust_print_main.rs
+++ b/samples/rust/rust_print_main.rs
@@ -101,7 +101,7 @@ fn drop(&mut self) {
}
mod trace {
- use kernel::ffi::c_int;
+ use kernel::prelude::*;
kernel::declare_trace! {
/// # Safety
--
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 ` [PATCH 1/3] gpu: nova-core: remove imports available via prelude Gary Guo
2026-01-25 21:17 ` 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 ` Gary Guo [this message]
2026-01-25 21:17 ` [PATCH 3/3] samples: rust: " 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-4-gary@garyguo.net \
--to=gary@garyguo.net \
--cc=a.hindborg@kernel.org \
--cc=aliceryhl@google.com \
--cc=arnd@arndb.de \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=david.m.ertman@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=ira.weiny@intel.com \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rafael@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
/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