public inbox for rust-for-linux@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] rust: auxiliary: use "kernel vertical" style for imports
@ 2026-01-05 14:19 Danilo Krummrich
  2026-01-05 14:19 ` [PATCH 2/5] rust: platform: " Danilo Krummrich
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Danilo Krummrich @ 2026-01-05 14:19 UTC (permalink / raw)
  To: gregkh, rafael, ojeda, boqun.feng, gary, bjorn3_gh, lossin,
	a.hindborg, aliceryhl, tmgross, david.m.ertman, ira.weiny, leon
  Cc: linux-kernel, rust-for-linux, linux-usb, Danilo Krummrich

Convert all imports to use "kernel vertical" style.

With this, subsequent patches neither introduce unrelated changes nor
leave an inconsistent import pattern.

While at it, drop unnecessary imports covered by prelude::*.

Link: https://docs.kernel.org/rust/coding-guidelines.html#imports
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
---
 rust/kernel/auxiliary.rs              | 21 ++++++++++++++++-----
 samples/rust/rust_driver_auxiliary.rs |  8 +++++---
 2 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/rust/kernel/auxiliary.rs b/rust/kernel/auxiliary.rs
index 56f3c180e8f6..f8273cf165dc 100644
--- a/rust/kernel/auxiliary.rs
+++ b/rust/kernel/auxiliary.rs
@@ -5,19 +5,30 @@
 //! C header: [`include/linux/auxiliary_bus.h`](srctree/include/linux/auxiliary_bus.h)
 
 use crate::{
-    bindings, container_of, device,
-    device_id::{RawDeviceId, RawDeviceIdIndex},
+    bindings,
+    container_of,
+    device,
+    device_id::{
+        RawDeviceId,
+        RawDeviceIdIndex, //
+    },
     devres::Devres,
     driver,
-    error::{from_result, to_result, Result},
+    error::{
+        from_result,
+        to_result, //
+    },
     prelude::*,
     types::Opaque,
-    ThisModule,
+    ThisModule, //
 };
 use core::{
     marker::PhantomData,
     mem::offset_of,
-    ptr::{addr_of_mut, NonNull},
+    ptr::{
+        addr_of_mut,
+        NonNull, //
+    },
 };
 
 /// An adapter for the registration of auxiliary drivers.
diff --git a/samples/rust/rust_driver_auxiliary.rs b/samples/rust/rust_driver_auxiliary.rs
index 1e4fb23cfcb0..f148124fe81f 100644
--- a/samples/rust/rust_driver_auxiliary.rs
+++ b/samples/rust/rust_driver_auxiliary.rs
@@ -6,13 +6,15 @@
 
 use kernel::{
     auxiliary,
-    device::{Bound, Core},
+    device::{
+        Bound,
+        Core, //
+    },
     devres::Devres,
     driver,
-    error::Error,
     pci,
     prelude::*,
-    InPlaceModule,
+    InPlaceModule, //
 };
 
 use core::any::TypeId;

base-commit: 7bf97992afa4e815f4ed84638340e2a93de65504
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/5] rust: platform: use "kernel vertical" style for imports
  2026-01-05 14:19 [PATCH 1/5] rust: auxiliary: use "kernel vertical" style for imports Danilo Krummrich
@ 2026-01-05 14:19 ` Danilo Krummrich
  2026-01-07 15:09   ` Greg KH
  2026-01-07 21:29   ` Danilo Krummrich
  2026-01-05 14:19 ` [PATCH 3/5] rust: driver-core: " Danilo Krummrich
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 17+ messages in thread
From: Danilo Krummrich @ 2026-01-05 14:19 UTC (permalink / raw)
  To: gregkh, rafael, ojeda, boqun.feng, gary, bjorn3_gh, lossin,
	a.hindborg, aliceryhl, tmgross, david.m.ertman, ira.weiny, leon
  Cc: linux-kernel, rust-for-linux, linux-usb, Danilo Krummrich

Convert all imports to use "kernel vertical" style.

With this, subsequent patches neither introduce unrelated changes nor
leave an inconsistent import pattern.

While at it, drop unnecessary imports covered by prelude::*.

Link: https://docs.kernel.org/rust/coding-guidelines.html#imports
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
---
 rust/kernel/platform.rs              | 31 +++++++++++++++++++++-------
 samples/rust/rust_driver_platform.rs | 10 ++++++---
 2 files changed, 31 insertions(+), 10 deletions(-)

diff --git a/rust/kernel/platform.rs b/rust/kernel/platform.rs
index bddb593cee7b..8836ac46b066 100644
--- a/rust/kernel/platform.rs
+++ b/rust/kernel/platform.rs
@@ -5,22 +5,39 @@
 //! C header: [`include/linux/platform_device.h`](srctree/include/linux/platform_device.h)
 
 use crate::{
-    acpi, bindings, container_of,
-    device::{self, Bound},
+    acpi,
+    bindings,
+    container_of,
+    device::{
+        self,
+        Bound, //
+    },
     driver,
-    error::{from_result, to_result, Result},
-    io::{mem::IoRequest, Resource},
-    irq::{self, IrqRequest},
+    error::{
+        from_result,
+        to_result, //
+    },
+    io::{
+        mem::IoRequest,
+        Resource, //
+    },
+    irq::{
+        self,
+        IrqRequest, //
+    },
     of,
     prelude::*,
     types::Opaque,
-    ThisModule,
+    ThisModule, //
 };
 
 use core::{
     marker::PhantomData,
     mem::offset_of,
-    ptr::{addr_of_mut, NonNull},
+    ptr::{
+        addr_of_mut,
+        NonNull, //
+    },
 };
 
 /// An adapter for the registration of platform drivers.
diff --git a/samples/rust/rust_driver_platform.rs b/samples/rust/rust_driver_platform.rs
index a3044d773176..9537dc38c563 100644
--- a/samples/rust/rust_driver_platform.rs
+++ b/samples/rust/rust_driver_platform.rs
@@ -66,13 +66,17 @@
     acpi,
     device::{
         self,
-        property::{FwNodeReferenceArgs, NArgs},
+        property::{
+            FwNodeReferenceArgs,
+            NArgs, //
+        },
         Core,
     },
-    of, platform,
+    of,
+    platform,
     prelude::*,
     str::CString,
-    sync::aref::ARef,
+    sync::aref::ARef, //
 };
 
 struct SampleDriver {
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 3/5] rust: driver-core: use "kernel vertical" style for imports
  2026-01-05 14:19 [PATCH 1/5] rust: auxiliary: use "kernel vertical" style for imports Danilo Krummrich
  2026-01-05 14:19 ` [PATCH 2/5] rust: platform: " Danilo Krummrich
@ 2026-01-05 14:19 ` Danilo Krummrich
  2026-01-07 15:09   ` Greg KH
  2026-01-07 21:30   ` Danilo Krummrich
  2026-01-05 14:19 ` [PATCH 4/5] rust: usb: " Danilo Krummrich
                   ` (3 subsequent siblings)
  5 siblings, 2 replies; 17+ messages in thread
From: Danilo Krummrich @ 2026-01-05 14:19 UTC (permalink / raw)
  To: gregkh, rafael, ojeda, boqun.feng, gary, bjorn3_gh, lossin,
	a.hindborg, aliceryhl, tmgross, david.m.ertman, ira.weiny, leon
  Cc: linux-kernel, rust-for-linux, linux-usb, Danilo Krummrich

Convert all imports to use "kernel vertical" style.

With this, subsequent patches neither introduce unrelated changes nor
leave an inconsistent import pattern.

While at it, drop unnecessary imports covered by prelude::*.

Link: https://docs.kernel.org/rust/coding-guidelines.html#imports
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
---
 rust/kernel/device.rs | 14 +++++++++++---
 rust/kernel/devres.rs | 25 +++++++++++++++++++------
 rust/kernel/driver.rs | 12 ++++++++----
 3 files changed, 38 insertions(+), 13 deletions(-)

diff --git a/rust/kernel/device.rs b/rust/kernel/device.rs
index a13f6ee24b09..ec9b0945b74c 100644
--- a/rust/kernel/device.rs
+++ b/rust/kernel/device.rs
@@ -5,12 +5,20 @@
 //! C header: [`include/linux/device.h`](srctree/include/linux/device.h)
 
 use crate::{
-    bindings, fmt,
+    bindings,
+    fmt,
     prelude::*,
     sync::aref::ARef,
-    types::{ForeignOwnable, Opaque},
+    types::{
+        ForeignOwnable,
+        Opaque, //
+    }, //
+};
+use core::{
+    any::TypeId,
+    marker::PhantomData,
+    ptr, //
 };
-use core::{any::TypeId, marker::PhantomData, ptr};
 
 use crate::str::CStrExt as _;
 
diff --git a/rust/kernel/devres.rs b/rust/kernel/devres.rs
index 835d9c11948e..db02f8b1788d 100644
--- a/rust/kernel/devres.rs
+++ b/rust/kernel/devres.rs
@@ -8,13 +8,26 @@
 use crate::{
     alloc::Flags,
     bindings,
-    device::{Bound, Device},
-    error::{to_result, Error, Result},
-    ffi::c_void,
+    device::{
+        Bound,
+        Device, //
+    },
+    error::to_result,
     prelude::*,
-    revocable::{Revocable, RevocableGuard},
-    sync::{aref::ARef, rcu, Completion},
-    types::{ForeignOwnable, Opaque, ScopeGuard},
+    revocable::{
+        Revocable,
+        RevocableGuard, //
+    },
+    sync::{
+        aref::ARef,
+        rcu,
+        Completion, //
+    },
+    types::{
+        ForeignOwnable,
+        Opaque,
+        ScopeGuard, //
+    },
 };
 
 use pin_init::Wrapper;
diff --git a/rust/kernel/driver.rs b/rust/kernel/driver.rs
index 9beae2e3d57e..866d5d76ca7e 100644
--- a/rust/kernel/driver.rs
+++ b/rust/kernel/driver.rs
@@ -90,10 +90,14 @@
 //! [`pci::Driver`]: kernel::pci::Driver
 //! [`platform::Driver`]: kernel::platform::Driver
 
-use crate::error::{Error, Result};
-use crate::{acpi, device, of, str::CStr, try_pin_init, types::Opaque, ThisModule};
-use core::pin::Pin;
-use pin_init::{pin_data, pinned_drop, PinInit};
+use crate::{
+    acpi,
+    device,
+    of,
+    prelude::*,
+    types::Opaque,
+    ThisModule, //
+};
 
 /// The [`RegistrationOps`] trait serves as generic interface for subsystems (e.g., PCI, Platform,
 /// Amba, etc.) to provide the corresponding subsystem specific implementation to register /
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 4/5] rust: usb: use "kernel vertical" style for imports
  2026-01-05 14:19 [PATCH 1/5] rust: auxiliary: use "kernel vertical" style for imports Danilo Krummrich
  2026-01-05 14:19 ` [PATCH 2/5] rust: platform: " Danilo Krummrich
  2026-01-05 14:19 ` [PATCH 3/5] rust: driver-core: " Danilo Krummrich
@ 2026-01-05 14:19 ` Danilo Krummrich
  2026-01-05 19:36   ` Daniel Almeida
  2026-01-06 19:26   ` Danilo Krummrich
  2026-01-05 14:19 ` [PATCH 5/5] rust: faux: " Danilo Krummrich
                   ` (2 subsequent siblings)
  5 siblings, 2 replies; 17+ messages in thread
From: Danilo Krummrich @ 2026-01-05 14:19 UTC (permalink / raw)
  To: gregkh, rafael, ojeda, boqun.feng, gary, bjorn3_gh, lossin,
	a.hindborg, aliceryhl, tmgross, david.m.ertman, ira.weiny, leon
  Cc: linux-kernel, rust-for-linux, linux-usb, Danilo Krummrich

Convert all imports to use "kernel vertical" style.

With this, subsequent patches neither introduce unrelated changes nor
leave an inconsistent import pattern.

While at it, drop unnecessary imports covered by prelude::*.

Link: https://docs.kernel.org/rust/coding-guidelines.html#imports
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
---
@Greg: If you agree I will take this through the driver-core tree. I will have
driver-core patches building on top of this.
---
 rust/kernel/usb.rs              | 21 +++++++++++++++------
 samples/rust/rust_driver_usb.rs | 10 +++++++++-
 2 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/rust/kernel/usb.rs b/rust/kernel/usb.rs
index d10b65e9fb6a..99b07b5ac491 100644
--- a/rust/kernel/usb.rs
+++ b/rust/kernel/usb.rs
@@ -6,14 +6,23 @@
 //! C header: [`include/linux/usb.h`](srctree/include/linux/usb.h)
 
 use crate::{
-    bindings, device,
-    device_id::{RawDeviceId, RawDeviceIdIndex},
+    bindings,
+    device,
+    device_id::{
+        RawDeviceId,
+        RawDeviceIdIndex, //
+    },
     driver,
-    error::{from_result, to_result, Result},
+    error::{
+        from_result,
+        to_result, //
+    },
     prelude::*,
-    str::CStr,
-    types::{AlwaysRefCounted, Opaque},
-    ThisModule,
+    types::{
+        AlwaysRefCounted,
+        Opaque, //
+    },
+    ThisModule, //
 };
 use core::{
     marker::PhantomData,
diff --git a/samples/rust/rust_driver_usb.rs b/samples/rust/rust_driver_usb.rs
index 4eaad14867b2..ab72e99e1274 100644
--- a/samples/rust/rust_driver_usb.rs
+++ b/samples/rust/rust_driver_usb.rs
@@ -3,7 +3,15 @@
 
 //! Rust USB driver sample.
 
-use kernel::{device, device::Core, prelude::*, sync::aref::ARef, usb};
+use kernel::{
+    device::{
+        self,
+        Core, //
+    },
+    prelude::*,
+    sync::aref::ARef,
+    usb, //
+};
 
 struct SampleDriver {
     _intf: ARef<usb::Interface>,
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 5/5] rust: faux: use "kernel vertical" style for imports
  2026-01-05 14:19 [PATCH 1/5] rust: auxiliary: use "kernel vertical" style for imports Danilo Krummrich
                   ` (2 preceding siblings ...)
  2026-01-05 14:19 ` [PATCH 4/5] rust: usb: " Danilo Krummrich
@ 2026-01-05 14:19 ` Danilo Krummrich
  2026-01-07 15:09   ` Greg KH
  2026-01-07 21:30   ` Danilo Krummrich
  2026-01-07 15:09 ` [PATCH 1/5] rust: auxiliary: " Greg KH
  2026-01-07 21:29 ` Danilo Krummrich
  5 siblings, 2 replies; 17+ messages in thread
From: Danilo Krummrich @ 2026-01-05 14:19 UTC (permalink / raw)
  To: gregkh, rafael, ojeda, boqun.feng, gary, bjorn3_gh, lossin,
	a.hindborg, aliceryhl, tmgross, david.m.ertman, ira.weiny, leon
  Cc: linux-kernel, rust-for-linux, linux-usb, Danilo Krummrich

Convert all imports to use "kernel vertical" style.

With this, subsequent patches neither introduce unrelated changes nor
leave an inconsistent import pattern.

While at it, drop unnecessary imports covered by prelude::*.

Link: https://docs.kernel.org/rust/coding-guidelines.html#imports
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
---
 rust/kernel/faux.rs | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/rust/kernel/faux.rs b/rust/kernel/faux.rs
index 7fe2dd197e37..43b4974f48cd 100644
--- a/rust/kernel/faux.rs
+++ b/rust/kernel/faux.rs
@@ -6,8 +6,17 @@
 //!
 //! C header: [`include/linux/device/faux.h`](srctree/include/linux/device/faux.h)
 
-use crate::{bindings, device, error::code::*, prelude::*};
-use core::ptr::{addr_of_mut, null, null_mut, NonNull};
+use crate::{
+    bindings,
+    device,
+    prelude::*, //
+};
+use core::ptr::{
+    addr_of_mut,
+    null,
+    null_mut,
+    NonNull, //
+};
 
 /// The registration of a faux device.
 ///
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH 4/5] rust: usb: use "kernel vertical" style for imports
  2026-01-05 14:19 ` [PATCH 4/5] rust: usb: " Danilo Krummrich
@ 2026-01-05 19:36   ` Daniel Almeida
  2026-01-05 23:41     ` Miguel Ojeda
  2026-01-06 19:26   ` Danilo Krummrich
  1 sibling, 1 reply; 17+ messages in thread
From: Daniel Almeida @ 2026-01-05 19:36 UTC (permalink / raw)
  To: Danilo Krummrich
  Cc: gregkh, rafael, ojeda, boqun.feng, gary, bjorn3_gh, lossin,
	a.hindborg, aliceryhl, tmgross, david.m.ertman, ira.weiny, leon,
	linux-kernel, rust-for-linux, linux-usb



> On 5 Jan 2026, at 11:19, Danilo Krummrich <dakr@kernel.org> wrote:
> 
> Convert all imports to use "kernel vertical" style.
> 
> With this, subsequent patches neither introduce unrelated changes nor
> leave an inconsistent import pattern.
> 
> While at it, drop unnecessary imports covered by prelude::*.
> 
> Link: https://docs.kernel.org/rust/coding-guidelines.html#imports
> Signed-off-by: Danilo Krummrich <dakr@kernel.org>
> ---
> @Greg: If you agree I will take this through the driver-core tree. I will have
> driver-core patches building on top of this.
> ---
> rust/kernel/usb.rs              | 21 +++++++++++++++------
> samples/rust/rust_driver_usb.rs | 10 +++++++++-
> 2 files changed, 24 insertions(+), 7 deletions(-)
> 
> diff --git a/rust/kernel/usb.rs b/rust/kernel/usb.rs
> index d10b65e9fb6a..99b07b5ac491 100644
> --- a/rust/kernel/usb.rs
> +++ b/rust/kernel/usb.rs
> @@ -6,14 +6,23 @@
> //! C header: [`include/linux/usb.h`](srctree/include/linux/usb.h)
> 
> use crate::{
> -    bindings, device,
> -    device_id::{RawDeviceId, RawDeviceIdIndex},
> +    bindings,
> +    device,
> +    device_id::{
> +        RawDeviceId,
> +        RawDeviceIdIndex, //
> +    },
>     driver,
> -    error::{from_result, to_result, Result},
> +    error::{
> +        from_result,
> +        to_result, //
> +    },
>     prelude::*,
> -    str::CStr,
> -    types::{AlwaysRefCounted, Opaque},
> -    ThisModule,
> +    types::{
> +        AlwaysRefCounted,
> +        Opaque, //
> +    },
> +    ThisModule, //
> };
> use core::{
>     marker::PhantomData,
> diff --git a/samples/rust/rust_driver_usb.rs b/samples/rust/rust_driver_usb.rs
> index 4eaad14867b2..ab72e99e1274 100644
> --- a/samples/rust/rust_driver_usb.rs
> +++ b/samples/rust/rust_driver_usb.rs
> @@ -3,7 +3,15 @@
> 
> //! Rust USB driver sample.
> 
> -use kernel::{device, device::Core, prelude::*, sync::aref::ARef, usb};
> +use kernel::{
> +    device::{
> +        self,
> +        Core, //
> +    },
> +    prelude::*,
> +    sync::aref::ARef,
> +    usb, //
> +};
> 
> struct SampleDriver {
>     _intf: ARef<usb::Interface>,
> -- 
> 2.52.0
> 
> 

OOC: can rustfmt do this, or is it a manual process for the time being?

Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 4/5] rust: usb: use "kernel vertical" style for imports
  2026-01-05 19:36   ` Daniel Almeida
@ 2026-01-05 23:41     ` Miguel Ojeda
  0 siblings, 0 replies; 17+ messages in thread
From: Miguel Ojeda @ 2026-01-05 23:41 UTC (permalink / raw)
  To: Daniel Almeida
  Cc: Danilo Krummrich, gregkh, rafael, ojeda, boqun.feng, gary,
	bjorn3_gh, lossin, a.hindborg, aliceryhl, tmgross, david.m.ertman,
	ira.weiny, leon, linux-kernel, rust-for-linux, linux-usb

On Mon, Jan 5, 2026 at 8:36 PM Daniel Almeida
<daniel.almeida@collabora.com> wrote:
>
> OOC: can rustfmt do this, or is it a manual process for the time being?

It does it if you add the `//`, but adding the `//` is manual, i.e. it
will do what you want but you have to trigger it by having the `//`:

    https://docs.kernel.org/rust/coding-guidelines.html#imports

The goal is that `rustfmt` does exactly this, but without having to
write the `//` (and without needing/adding the `//` itself).

I hope that helps!

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 4/5] rust: usb: use "kernel vertical" style for imports
  2026-01-05 14:19 ` [PATCH 4/5] rust: usb: " Danilo Krummrich
  2026-01-05 19:36   ` Daniel Almeida
@ 2026-01-06 19:26   ` Danilo Krummrich
  2026-01-07 15:09     ` Greg KH
  1 sibling, 1 reply; 17+ messages in thread
From: Danilo Krummrich @ 2026-01-06 19:26 UTC (permalink / raw)
  To: gregkh
  Cc: rafael, ojeda, boqun.feng, gary, bjorn3_gh, lossin, a.hindborg,
	aliceryhl, tmgross, david.m.ertman, ira.weiny, leon, linux-kernel,
	rust-for-linux, linux-usb

On Mon Jan 5, 2026 at 3:19 PM CET, Danilo Krummrich wrote:
> Convert all imports to use "kernel vertical" style.
>
> With this, subsequent patches neither introduce unrelated changes nor
> leave an inconsistent import pattern.
>
> While at it, drop unnecessary imports covered by prelude::*.
>
> Link: https://docs.kernel.org/rust/coding-guidelines.html#imports
> Signed-off-by: Danilo Krummrich <dakr@kernel.org>
> ---
> @Greg: If you agree I will take this through the driver-core tree. I will have
> driver-core patches building on top of this.

Nevermind, I don't need it in the driver-core tree after all. :)

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/5] rust: auxiliary: use "kernel vertical" style for imports
  2026-01-05 14:19 [PATCH 1/5] rust: auxiliary: use "kernel vertical" style for imports Danilo Krummrich
                   ` (3 preceding siblings ...)
  2026-01-05 14:19 ` [PATCH 5/5] rust: faux: " Danilo Krummrich
@ 2026-01-07 15:09 ` Greg KH
  2026-01-07 21:29 ` Danilo Krummrich
  5 siblings, 0 replies; 17+ messages in thread
From: Greg KH @ 2026-01-07 15:09 UTC (permalink / raw)
  To: Danilo Krummrich
  Cc: rafael, ojeda, boqun.feng, gary, bjorn3_gh, lossin, a.hindborg,
	aliceryhl, tmgross, david.m.ertman, ira.weiny, leon, linux-kernel,
	rust-for-linux, linux-usb

On Mon, Jan 05, 2026 at 03:19:42PM +0100, Danilo Krummrich wrote:
> Convert all imports to use "kernel vertical" style.
> 
> With this, subsequent patches neither introduce unrelated changes nor
> leave an inconsistent import pattern.
> 
> While at it, drop unnecessary imports covered by prelude::*.
> 
> Link: https://docs.kernel.org/rust/coding-guidelines.html#imports
> Signed-off-by: Danilo Krummrich <dakr@kernel.org>
> ---
>  rust/kernel/auxiliary.rs              | 21 ++++++++++++++++-----
>  samples/rust/rust_driver_auxiliary.rs |  8 +++++---
>  2 files changed, 21 insertions(+), 8 deletions(-)

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 4/5] rust: usb: use "kernel vertical" style for imports
  2026-01-06 19:26   ` Danilo Krummrich
@ 2026-01-07 15:09     ` Greg KH
  0 siblings, 0 replies; 17+ messages in thread
From: Greg KH @ 2026-01-07 15:09 UTC (permalink / raw)
  To: Danilo Krummrich
  Cc: rafael, ojeda, boqun.feng, gary, bjorn3_gh, lossin, a.hindborg,
	aliceryhl, tmgross, david.m.ertman, ira.weiny, leon, linux-kernel,
	rust-for-linux, linux-usb

On Tue, Jan 06, 2026 at 08:26:40PM +0100, Danilo Krummrich wrote:
> On Mon Jan 5, 2026 at 3:19 PM CET, Danilo Krummrich wrote:
> > Convert all imports to use "kernel vertical" style.
> >
> > With this, subsequent patches neither introduce unrelated changes nor
> > leave an inconsistent import pattern.
> >
> > While at it, drop unnecessary imports covered by prelude::*.
> >
> > Link: https://docs.kernel.org/rust/coding-guidelines.html#imports
> > Signed-off-by: Danilo Krummrich <dakr@kernel.org>
> > ---
> > @Greg: If you agree I will take this through the driver-core tree. I will have
> > driver-core patches building on top of this.
> 
> Nevermind, I don't need it in the driver-core tree after all. :)

Ok, I'll take it through the usb one now, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 5/5] rust: faux: use "kernel vertical" style for imports
  2026-01-05 14:19 ` [PATCH 5/5] rust: faux: " Danilo Krummrich
@ 2026-01-07 15:09   ` Greg KH
  2026-01-07 21:30   ` Danilo Krummrich
  1 sibling, 0 replies; 17+ messages in thread
From: Greg KH @ 2026-01-07 15:09 UTC (permalink / raw)
  To: Danilo Krummrich
  Cc: rafael, ojeda, boqun.feng, gary, bjorn3_gh, lossin, a.hindborg,
	aliceryhl, tmgross, david.m.ertman, ira.weiny, leon, linux-kernel,
	rust-for-linux, linux-usb

On Mon, Jan 05, 2026 at 03:19:46PM +0100, Danilo Krummrich wrote:
> Convert all imports to use "kernel vertical" style.
> 
> With this, subsequent patches neither introduce unrelated changes nor
> leave an inconsistent import pattern.
> 
> While at it, drop unnecessary imports covered by prelude::*.
> 
> Link: https://docs.kernel.org/rust/coding-guidelines.html#imports
> Signed-off-by: Danilo Krummrich <dakr@kernel.org>
> ---
>  rust/kernel/faux.rs | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/rust/kernel/faux.rs b/rust/kernel/faux.rs
> index 7fe2dd197e37..43b4974f48cd 100644
> --- a/rust/kernel/faux.rs
> +++ b/rust/kernel/faux.rs
> @@ -6,8 +6,17 @@
>  //!
>  //! C header: [`include/linux/device/faux.h`](srctree/include/linux/device/faux.h)
>  
> -use crate::{bindings, device, error::code::*, prelude::*};
> -use core::ptr::{addr_of_mut, null, null_mut, NonNull};
> +use crate::{
> +    bindings,
> +    device,
> +    prelude::*, //
> +};
> +use core::ptr::{
> +    addr_of_mut,
> +    null,
> +    null_mut,
> +    NonNull, //
> +};
>  
>  /// The registration of a faux device.
>  ///
> -- 
> 2.52.0
> 

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 3/5] rust: driver-core: use "kernel vertical" style for imports
  2026-01-05 14:19 ` [PATCH 3/5] rust: driver-core: " Danilo Krummrich
@ 2026-01-07 15:09   ` Greg KH
  2026-01-07 21:30   ` Danilo Krummrich
  1 sibling, 0 replies; 17+ messages in thread
From: Greg KH @ 2026-01-07 15:09 UTC (permalink / raw)
  To: Danilo Krummrich
  Cc: rafael, ojeda, boqun.feng, gary, bjorn3_gh, lossin, a.hindborg,
	aliceryhl, tmgross, david.m.ertman, ira.weiny, leon, linux-kernel,
	rust-for-linux, linux-usb

On Mon, Jan 05, 2026 at 03:19:44PM +0100, Danilo Krummrich wrote:
> Convert all imports to use "kernel vertical" style.
> 
> With this, subsequent patches neither introduce unrelated changes nor
> leave an inconsistent import pattern.
> 
> While at it, drop unnecessary imports covered by prelude::*.
> 
> Link: https://docs.kernel.org/rust/coding-guidelines.html#imports
> Signed-off-by: Danilo Krummrich <dakr@kernel.org>

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/5] rust: platform: use "kernel vertical" style for imports
  2026-01-05 14:19 ` [PATCH 2/5] rust: platform: " Danilo Krummrich
@ 2026-01-07 15:09   ` Greg KH
  2026-01-07 21:29   ` Danilo Krummrich
  1 sibling, 0 replies; 17+ messages in thread
From: Greg KH @ 2026-01-07 15:09 UTC (permalink / raw)
  To: Danilo Krummrich
  Cc: rafael, ojeda, boqun.feng, gary, bjorn3_gh, lossin, a.hindborg,
	aliceryhl, tmgross, david.m.ertman, ira.weiny, leon, linux-kernel,
	rust-for-linux, linux-usb

On Mon, Jan 05, 2026 at 03:19:43PM +0100, Danilo Krummrich wrote:
> Convert all imports to use "kernel vertical" style.
> 
> With this, subsequent patches neither introduce unrelated changes nor
> leave an inconsistent import pattern.
> 
> While at it, drop unnecessary imports covered by prelude::*.
> 
> Link: https://docs.kernel.org/rust/coding-guidelines.html#imports
> Signed-off-by: Danilo Krummrich <dakr@kernel.org>

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/5] rust: auxiliary: use "kernel vertical" style for imports
  2026-01-05 14:19 [PATCH 1/5] rust: auxiliary: use "kernel vertical" style for imports Danilo Krummrich
                   ` (4 preceding siblings ...)
  2026-01-07 15:09 ` [PATCH 1/5] rust: auxiliary: " Greg KH
@ 2026-01-07 21:29 ` Danilo Krummrich
  5 siblings, 0 replies; 17+ messages in thread
From: Danilo Krummrich @ 2026-01-07 21:29 UTC (permalink / raw)
  To: gregkh, rafael, ojeda, boqun.feng, gary, bjorn3_gh, lossin,
	a.hindborg, aliceryhl, tmgross, david.m.ertman, ira.weiny, leon
  Cc: linux-kernel, rust-for-linux, linux-usb

On Mon Jan 5, 2026 at 3:19 PM CET, Danilo Krummrich wrote:
> Convert all imports to use "kernel vertical" style.
>
> With this, subsequent patches neither introduce unrelated changes nor
> leave an inconsistent import pattern.
>
> While at it, drop unnecessary imports covered by prelude::*.
>
> Link: https://docs.kernel.org/rust/coding-guidelines.html#imports
> Signed-off-by: Danilo Krummrich <dakr@kernel.org>

Applied to driver-core-testing, thanks!

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/5] rust: platform: use "kernel vertical" style for imports
  2026-01-05 14:19 ` [PATCH 2/5] rust: platform: " Danilo Krummrich
  2026-01-07 15:09   ` Greg KH
@ 2026-01-07 21:29   ` Danilo Krummrich
  1 sibling, 0 replies; 17+ messages in thread
From: Danilo Krummrich @ 2026-01-07 21:29 UTC (permalink / raw)
  To: gregkh, rafael, ojeda, boqun.feng, gary, bjorn3_gh, lossin,
	a.hindborg, aliceryhl, tmgross, david.m.ertman, ira.weiny, leon
  Cc: linux-kernel, rust-for-linux, linux-usb

On Mon Jan 5, 2026 at 3:19 PM CET, Danilo Krummrich wrote:
> Convert all imports to use "kernel vertical" style.
>
> With this, subsequent patches neither introduce unrelated changes nor
> leave an inconsistent import pattern.
>
> While at it, drop unnecessary imports covered by prelude::*.
>
> Link: https://docs.kernel.org/rust/coding-guidelines.html#imports
> Signed-off-by: Danilo Krummrich <dakr@kernel.org>

Applied to driver-core-testing, thanks!

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 3/5] rust: driver-core: use "kernel vertical" style for imports
  2026-01-05 14:19 ` [PATCH 3/5] rust: driver-core: " Danilo Krummrich
  2026-01-07 15:09   ` Greg KH
@ 2026-01-07 21:30   ` Danilo Krummrich
  1 sibling, 0 replies; 17+ messages in thread
From: Danilo Krummrich @ 2026-01-07 21:30 UTC (permalink / raw)
  To: gregkh, rafael, ojeda, boqun.feng, gary, bjorn3_gh, lossin,
	a.hindborg, aliceryhl, tmgross, david.m.ertman, ira.weiny, leon
  Cc: linux-kernel, rust-for-linux, linux-usb

On Mon Jan 5, 2026 at 3:19 PM CET, Danilo Krummrich wrote:
> Convert all imports to use "kernel vertical" style.
>
> With this, subsequent patches neither introduce unrelated changes nor
> leave an inconsistent import pattern.
>
> While at it, drop unnecessary imports covered by prelude::*.
>
> Link: https://docs.kernel.org/rust/coding-guidelines.html#imports
> Signed-off-by: Danilo Krummrich <dakr@kernel.org>

Applied to driver-core-testing, thanks!

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 5/5] rust: faux: use "kernel vertical" style for imports
  2026-01-05 14:19 ` [PATCH 5/5] rust: faux: " Danilo Krummrich
  2026-01-07 15:09   ` Greg KH
@ 2026-01-07 21:30   ` Danilo Krummrich
  1 sibling, 0 replies; 17+ messages in thread
From: Danilo Krummrich @ 2026-01-07 21:30 UTC (permalink / raw)
  To: gregkh, rafael, ojeda, boqun.feng, gary, bjorn3_gh, lossin,
	a.hindborg, aliceryhl, tmgross, david.m.ertman, ira.weiny, leon
  Cc: linux-kernel, rust-for-linux, linux-usb

On Mon Jan 5, 2026 at 3:19 PM CET, Danilo Krummrich wrote:
> Convert all imports to use "kernel vertical" style.
>
> With this, subsequent patches neither introduce unrelated changes nor
> leave an inconsistent import pattern.
>
> While at it, drop unnecessary imports covered by prelude::*.
>
> Link: https://docs.kernel.org/rust/coding-guidelines.html#imports
> Signed-off-by: Danilo Krummrich <dakr@kernel.org>

Applied to driver-core-testing, thanks!

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2026-01-07 21:30 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-05 14:19 [PATCH 1/5] rust: auxiliary: use "kernel vertical" style for imports Danilo Krummrich
2026-01-05 14:19 ` [PATCH 2/5] rust: platform: " Danilo Krummrich
2026-01-07 15:09   ` Greg KH
2026-01-07 21:29   ` Danilo Krummrich
2026-01-05 14:19 ` [PATCH 3/5] rust: driver-core: " Danilo Krummrich
2026-01-07 15:09   ` Greg KH
2026-01-07 21:30   ` Danilo Krummrich
2026-01-05 14:19 ` [PATCH 4/5] rust: usb: " Danilo Krummrich
2026-01-05 19:36   ` Daniel Almeida
2026-01-05 23:41     ` Miguel Ojeda
2026-01-06 19:26   ` Danilo Krummrich
2026-01-07 15:09     ` Greg KH
2026-01-05 14:19 ` [PATCH 5/5] rust: faux: " Danilo Krummrich
2026-01-07 15:09   ` Greg KH
2026-01-07 21:30   ` Danilo Krummrich
2026-01-07 15:09 ` [PATCH 1/5] rust: auxiliary: " Greg KH
2026-01-07 21:29 ` Danilo Krummrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox