* [PATCH 1/3] gpu: nova-core: remove imports available via prelude
[not found] <20260123172007.136873-1-gary@garyguo.net>
@ 2026-01-23 17:19 ` Gary Guo
2026-01-25 21:17 ` Danilo Krummrich
2026-01-30 4:42 ` Miguel Ojeda
2026-01-23 17:19 ` [PATCH 2/3] block: rnull: " Gary Guo
2026-01-23 17:19 ` [PATCH 3/3] samples: rust: " Gary Guo
2 siblings, 2 replies; 17+ messages in thread
From: Gary Guo @ 2026-01-23 17:19 UTC (permalink / raw)
To: Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
Danilo Krummrich, Alexandre Courbot, David Airlie, Simona Vetter,
Daniel del Castillo, Joel Fernandes, John Hubbard,
Alistair Popple, Lyude Paul, Timur Tabi, Shankari Anand
Cc: rust-for-linux, nouveau, dri-devel, linux-kernel
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
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH 1/3] gpu: nova-core: remove imports available via prelude
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-30 4:42 ` Miguel Ojeda
1 sibling, 1 reply; 17+ messages in thread
From: Danilo Krummrich @ 2026-01-25 21:17 UTC (permalink / raw)
To: Gary Guo
Cc: Miguel Ojeda, Boqun Feng, Björn Roy Baron, Benno Lossin,
Andreas Hindborg, Alice Ryhl, Trevor Gross, Alexandre Courbot,
David Airlie, Simona Vetter, Daniel del Castillo, Joel Fernandes,
John Hubbard, Alistair Popple, Lyude Paul, Timur Tabi,
Shankari Anand, rust-for-linux, nouveau, dri-devel, linux-kernel
On Fri Jan 23, 2026 at 6:19 PM CET, Gary Guo wrote:
> 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>
I will pick this one up after -rc1 is out.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/3] gpu: nova-core: remove imports available via prelude
2026-01-25 21:17 ` Danilo Krummrich
@ 2026-01-27 11:30 ` Danilo Krummrich
2026-01-27 11:44 ` Miguel Ojeda
0 siblings, 1 reply; 17+ messages in thread
From: Danilo Krummrich @ 2026-01-27 11:30 UTC (permalink / raw)
To: Miguel Ojeda, Gary Guo
Cc: Boqun Feng, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
Alice Ryhl, Trevor Gross, Alexandre Courbot, David Airlie,
Simona Vetter, Daniel del Castillo, Joel Fernandes, John Hubbard,
Alistair Popple, Lyude Paul, Timur Tabi, Shankari Anand,
rust-for-linux, nouveau, dri-devel, linux-kernel
On Sun Jan 25, 2026 at 10:17 PM CET, Danilo Krummrich wrote:
> I will pick this one up after -rc1 is out.
I just checked and there shouldn't be any conflicts, so if you want to pick this
one up as well, please do. :)
Acked-by: Danilo Krummrich <dakr@kernel.org>
Given that klint can do quite some convinient extra checks, should we consider
making it an optional part of the build? Similar to what we do with clippy?
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/3] gpu: nova-core: remove imports available via prelude
2026-01-27 11:30 ` Danilo Krummrich
@ 2026-01-27 11:44 ` Miguel Ojeda
0 siblings, 0 replies; 17+ messages in thread
From: Miguel Ojeda @ 2026-01-27 11:44 UTC (permalink / raw)
To: Danilo Krummrich, Gary Guo, Nathan Chancellor, Andreas Hindborg
Cc: Miguel Ojeda, Boqun Feng, Björn Roy Baron, Benno Lossin,
Alice Ryhl, Trevor Gross, Alexandre Courbot, David Airlie,
Simona Vetter, Daniel del Castillo, Joel Fernandes, John Hubbard,
Alistair Popple, Lyude Paul, Timur Tabi, Shankari Anand,
rust-for-linux, nouveau, dri-devel, linux-kernel
On Tue, Jan 27, 2026 at 12:30 PM Danilo Krummrich <dakr@kernel.org> wrote:
>
> I just checked and there shouldn't be any conflicts, so if you want to pick this
> one up as well, please do. :)
>
> Acked-by: Danilo Krummrich <dakr@kernel.org>
Will, do thanks!
> Given that klint can do quite some convinient extra checks, should we consider
> making it an optional part of the build? Similar to what we do with clippy?
Yeah, that is the goal (e.g. `KLINT=1` or similar eventually).
But if someone wants to run it, it is already possible, IIUC Andreas
already did the other day.
To make things easier for developers/maintainers, I asked Nathan the
other day if we could have them in the LLVM+Rust kernel.org
toolchains, and he was supportive on adding it there when Gary is
ready, so it may be straightforward to set up in CIs! :)
(And later on, ideally, even on linux-next when we things are more settled)
Cheers,
Miguel
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 1/3] gpu: nova-core: remove imports available via prelude
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-30 4:42 ` Miguel Ojeda
1 sibling, 0 replies; 17+ messages in thread
From: Miguel Ojeda @ 2026-01-30 4:42 UTC (permalink / raw)
To: Gary Guo
Cc: Miguel Ojeda, Boqun Feng, Björn Roy Baron, Benno Lossin,
Andreas Hindborg, Alice Ryhl, Trevor Gross, Danilo Krummrich,
Alexandre Courbot, David Airlie, Simona Vetter,
Daniel del Castillo, Joel Fernandes, John Hubbard,
Alistair Popple, Lyude Paul, Timur Tabi, Shankari Anand,
rust-for-linux, nouveau, dri-devel, linux-kernel
On Sat, Jan 24, 2026 at 6:11 AM Gary Guo <gary@garyguo.net> wrote:
>
> 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>
Applied to `rust-next` -- thanks everyone!
With this last one done, this series has all been applied.
Cheers,
Miguel
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 2/3] block: rnull: remove imports available via prelude
[not found] <20260123172007.136873-1-gary@garyguo.net>
2026-01-23 17:19 ` [PATCH 1/3] gpu: nova-core: remove imports available via prelude Gary Guo
@ 2026-01-23 17:19 ` Gary Guo
2026-01-26 18:27 ` Andreas Hindborg
2026-01-23 17:19 ` [PATCH 3/3] samples: rust: " Gary Guo
2 siblings, 1 reply; 17+ messages in thread
From: Gary Guo @ 2026-01-23 17:19 UTC (permalink / raw)
To: Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
Danilo Krummrich, Jens Axboe
Cc: rust-for-linux, linux-block, linux-kernel
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/block/rnull/configfs.rs | 1 -
drivers/block/rnull/rnull.rs | 3 ---
2 files changed, 4 deletions(-)
diff --git a/drivers/block/rnull/configfs.rs b/drivers/block/rnull/configfs.rs
index bfe998d31eb9..7c2eb5c0b722 100644
--- a/drivers/block/rnull/configfs.rs
+++ b/drivers/block/rnull/configfs.rs
@@ -12,7 +12,6 @@
str::{kstrtobool_bytes, CString},
sync::Mutex,
};
-use pin_init::PinInit;
pub(crate) fn subsystem() -> impl PinInit<kernel::configfs::Subsystem<Config>, Error> {
let item_type = configfs_attrs! {
diff --git a/drivers/block/rnull/rnull.rs b/drivers/block/rnull/rnull.rs
index a9d5e575a2c4..0ca8715febe8 100644
--- a/drivers/block/rnull/rnull.rs
+++ b/drivers/block/rnull/rnull.rs
@@ -14,12 +14,9 @@
Operations, TagSet,
},
},
- error::Result,
- pr_info,
prelude::*,
sync::{aref::ARef, Arc},
};
-use pin_init::PinInit;
module! {
type: NullBlkModule,
--
2.51.2
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH 2/3] block: rnull: remove imports available via prelude
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
0 siblings, 1 reply; 17+ messages in thread
From: Andreas Hindborg @ 2026-01-26 18:27 UTC (permalink / raw)
To: Gary Guo, Miguel Ojeda, Boqun Feng, Gary Guo,
Björn Roy Baron, Benno Lossin, Alice Ryhl, Trevor Gross,
Danilo Krummrich, Jens Axboe
Cc: rust-for-linux, linux-block, linux-kernel
"Gary Guo" <gary@garyguo.net> writes:
> 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>
Acked-by: Andreas Hindborg <a.hindborg@kernel.org>
Best regards,
Andreas Hindborg
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/3] block: rnull: remove imports available via prelude
2026-01-26 18:27 ` Andreas Hindborg
@ 2026-01-26 18:37 ` Miguel Ojeda
2026-01-27 12:51 ` Andreas Hindborg
0 siblings, 1 reply; 17+ messages in thread
From: Miguel Ojeda @ 2026-01-26 18:37 UTC (permalink / raw)
To: Andreas Hindborg
Cc: Gary Guo, Miguel Ojeda, Boqun Feng, Björn Roy Baron,
Benno Lossin, Alice Ryhl, Trevor Gross, Danilo Krummrich,
Jens Axboe, rust-for-linux, linux-block, linux-kernel
On Mon, Jan 26, 2026 at 7:27 PM Andreas Hindborg <a.hindborg@kernel.org> wrote:
>
> Acked-by: Andreas Hindborg <a.hindborg@kernel.org>
Is this for Jens or do you want me to pick it up?
Thanks!
Cheers,
Miguel
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/3] block: rnull: remove imports available via prelude
2026-01-26 18:37 ` Miguel Ojeda
@ 2026-01-27 12:51 ` Andreas Hindborg
0 siblings, 0 replies; 17+ messages in thread
From: Andreas Hindborg @ 2026-01-27 12:51 UTC (permalink / raw)
To: Jens Axboe
Cc: Gary Guo, Miguel Ojeda, Boqun Feng, Björn Roy Baron,
Benno Lossin, Alice Ryhl, Trevor Gross, Danilo Krummrich,
rust-for-linux, linux-block, linux-kernel, Miguel Ojeda
"Miguel Ojeda" <miguel.ojeda.sandonis@gmail.com> writes:
> On Mon, Jan 26, 2026 at 7:27 PM Andreas Hindborg <a.hindborg@kernel.org> wrote:
>>
>> Acked-by: Andreas Hindborg <a.hindborg@kernel.org>
>
> Is this for Jens or do you want me to pick it up?
I think Jens is supposed to pick the block patches.
Best regards,
Andreas Hindborg
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 3/3] samples: rust: remove imports available via prelude
[not found] <20260123172007.136873-1-gary@garyguo.net>
2026-01-23 17:19 ` [PATCH 1/3] gpu: nova-core: remove imports available via prelude Gary Guo
2026-01-23 17:19 ` [PATCH 2/3] block: rnull: " Gary Guo
@ 2026-01-23 17:19 ` Gary Guo
2026-01-25 21:17 ` Danilo Krummrich
` (3 more replies)
2 siblings, 4 replies; 17+ messages in thread
From: Gary Guo @ 2026-01-23 17:19 UTC (permalink / raw)
To: Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
Danilo Krummrich, Greg Kroah-Hartman, Rafael J. Wysocki,
Dave Ertman, Ira Weiny, Leon Romanovsky, Arnd Bergmann
Cc: rust-for-linux, linux-kernel
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
^ permalink raw reply related [flat|nested] 17+ messages in thread* Re: [PATCH 3/3] samples: rust: remove imports available via prelude
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
` (2 subsequent siblings)
3 siblings, 0 replies; 17+ messages in thread
From: Danilo Krummrich @ 2026-01-25 21:17 UTC (permalink / raw)
To: Gary Guo
Cc: Miguel Ojeda, Boqun Feng, Björn Roy Baron, Benno Lossin,
Andreas Hindborg, Alice Ryhl, Trevor Gross, Greg Kroah-Hartman,
Rafael J. Wysocki, Dave Ertman, Ira Weiny, Leon Romanovsky,
Arnd Bergmann, rust-for-linux, linux-kernel
On Fri Jan 23, 2026 at 6:19 PM CET, Gary Guo wrote:
> samples/rust/rust_driver_auxiliary.rs | 1 -
Acked-by: Danilo Krummrich <dakr@kernel.org>
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 3/3] samples: rust: remove imports available via prelude
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-27 11:10 ` Miguel Ojeda
3 siblings, 0 replies; 17+ messages in thread
From: Alice Ryhl @ 2026-01-26 9:23 UTC (permalink / raw)
To: Gary Guo
Cc: Miguel Ojeda, Boqun Feng, Björn Roy Baron, Benno Lossin,
Andreas Hindborg, Trevor Gross, Danilo Krummrich,
Greg Kroah-Hartman, Rafael J. Wysocki, Dave Ertman, Ira Weiny,
Leon Romanovsky, Arnd Bergmann, rust-for-linux, linux-kernel
On Fri, Jan 23, 2026 at 05:19:42PM +0000, Gary Guo wrote:
> 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>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 3/3] samples: rust: remove imports available via prelude
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
3 siblings, 1 reply; 17+ messages in thread
From: Miguel Ojeda @ 2026-01-26 15:02 UTC (permalink / raw)
To: Gary Guo, Greg Kroah-Hartman, Arnd Bergmann
Cc: Miguel Ojeda, Boqun Feng, Björn Roy Baron, Benno Lossin,
Andreas Hindborg, Alice Ryhl, Trevor Gross, Danilo Krummrich,
Rafael J. Wysocki, Dave Ertman, Ira Weiny, Leon Romanovsky,
rust-for-linux, linux-kernel
On Sat, Jan 24, 2026 at 6:08 AM Gary Guo <gary@garyguo.net> wrote:
>
> samples/rust/rust_misc_device.rs | 2 --
If Greg/Arnd don't say otherwise, I will eventually pick this patch
including the file above, given it is trivial.
Cheers,
Miguel
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 3/3] samples: rust: remove imports available via prelude
2026-01-26 15:02 ` Miguel Ojeda
@ 2026-01-26 16:04 ` Greg Kroah-Hartman
0 siblings, 0 replies; 17+ messages in thread
From: Greg Kroah-Hartman @ 2026-01-26 16:04 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Gary Guo, Arnd Bergmann, Miguel Ojeda, Boqun Feng,
Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
Trevor Gross, Danilo Krummrich, Rafael J. Wysocki, Dave Ertman,
Ira Weiny, Leon Romanovsky, rust-for-linux, linux-kernel
On Mon, Jan 26, 2026 at 04:02:29PM +0100, Miguel Ojeda wrote:
> On Sat, Jan 24, 2026 at 6:08 AM Gary Guo <gary@garyguo.net> wrote:
> >
> > samples/rust/rust_misc_device.rs | 2 --
>
> If Greg/Arnd don't say otherwise, I will eventually pick this patch
> including the file above, given it is trivial.
No objection from me:
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 3/3] samples: rust: remove imports available via prelude
2026-01-23 17:19 ` [PATCH 3/3] samples: rust: " Gary Guo
` (2 preceding siblings ...)
2026-01-26 15:02 ` Miguel Ojeda
@ 2026-01-27 11:10 ` Miguel Ojeda
2026-01-30 12:45 ` Dirk Behme
3 siblings, 1 reply; 17+ messages in thread
From: Miguel Ojeda @ 2026-01-27 11:10 UTC (permalink / raw)
To: Gary Guo
Cc: Miguel Ojeda, Boqun Feng, Björn Roy Baron, Benno Lossin,
Andreas Hindborg, Alice Ryhl, Trevor Gross, Danilo Krummrich,
Greg Kroah-Hartman, Rafael J. Wysocki, Dave Ertman, Ira Weiny,
Leon Romanovsky, Arnd Bergmann, rust-for-linux, linux-kernel
On Sat, Jan 24, 2026 at 6:08 AM Gary Guo <gary@garyguo.net> wrote:
>
> 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>
Applied (this one only) to `rust-next` -- thanks everyone!
Cheers,
Miguel
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 3/3] samples: rust: remove imports available via prelude
2026-01-27 11:10 ` Miguel Ojeda
@ 2026-01-30 12:45 ` Dirk Behme
2026-01-30 14:24 ` Gary Guo
0 siblings, 1 reply; 17+ messages in thread
From: Dirk Behme @ 2026-01-30 12:45 UTC (permalink / raw)
To: Miguel Ojeda, Gary Guo
Cc: Miguel Ojeda, Boqun Feng, Björn Roy Baron, Benno Lossin,
Andreas Hindborg, Alice Ryhl, Trevor Gross, Danilo Krummrich,
Greg Kroah-Hartman, Rafael J. Wysocki, Dave Ertman, Ira Weiny,
Leon Romanovsky, Arnd Bergmann, rust-for-linux, linux-kernel
On 27/01/2026 12:10, Miguel Ojeda wrote:
> On Sat, Jan 24, 2026 at 6:08 AM Gary Guo <gary@garyguo.net> wrote:
>>
>> 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>
>
> Applied (this one only) to `rust-next` -- thanks everyone!
Having my klint setup running now (many thanks Gary!) on today's
rust-next [1] I still get
error: this item is available via prelude
--> samples/rust/rust_driver_auxiliary.rs:12:5
|
12 | error::Error,
| ^^^^^^^^^^^^
|
= help: import with `kernel::prelude::*` instead
= note: `-D klint::not-using-prelude` implied by `-D warnings`
= help: to override `-D warnings` add
`#[allow(klint::not_using_prelude)]`
error: aborting due to 1 previous error
Somehow dropping this was not part of this patch. Not sure why ...
Best regards
Dirk
[1] HEAD is 08afcc38a64c ("Merge patch series "Add support for print
exactly once"")
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [PATCH 3/3] samples: rust: remove imports available via prelude
2026-01-30 12:45 ` Dirk Behme
@ 2026-01-30 14:24 ` Gary Guo
0 siblings, 0 replies; 17+ messages in thread
From: Gary Guo @ 2026-01-30 14:24 UTC (permalink / raw)
To: Dirk Behme, Miguel Ojeda, Gary Guo
Cc: Miguel Ojeda, Boqun Feng, Björn Roy Baron, Benno Lossin,
Andreas Hindborg, Alice Ryhl, Trevor Gross, Danilo Krummrich,
Greg Kroah-Hartman, Rafael J. Wysocki, Dave Ertman, Ira Weiny,
Leon Romanovsky, Arnd Bergmann, rust-for-linux, linux-kernel
On Fri Jan 30, 2026 at 12:45 PM GMT, Dirk Behme wrote:
> On 27/01/2026 12:10, Miguel Ojeda wrote:
>> On Sat, Jan 24, 2026 at 6:08 AM Gary Guo <gary@garyguo.net> wrote:
>>>
>>> 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>
>>
>> Applied (this one only) to `rust-next` -- thanks everyone!
>
> Having my klint setup running now (many thanks Gary!) on today's
> rust-next [1] I still get
>
> error: this item is available via prelude
> --> samples/rust/rust_driver_auxiliary.rs:12:5
> |
> 12 | error::Error,
> | ^^^^^^^^^^^^
> |
> = help: import with `kernel::prelude::*` instead
> = note: `-D klint::not-using-prelude` implied by `-D warnings`
> = help: to override `-D warnings` add
> `#[allow(klint::not_using_prelude)]`
>
> error: aborting due to 1 previous error
>
> Somehow dropping this was not part of this patch. Not sure why ...
It was already dropped in
https://lore.kernel.org/rust-for-linux/20260105142123.95030-1-dakr@kernel.org/
Best,
Gary
>
> Best regards
>
> Dirk
>
> [1] HEAD is 08afcc38a64c ("Merge patch series "Add support for print
> exactly once"")
^ permalink raw reply [flat|nested] 17+ messages in thread