]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rust: auxiliary: use "kernel vertical" style for imports
authorDanilo Krummrich <dakr@kernel.org>
Mon, 5 Jan 2026 14:19:42 +0000 (15:19 +0100)
committerDanilo Krummrich <dakr@kernel.org>
Wed, 7 Jan 2026 18:55:49 +0000 (19:55 +0100)
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
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/20260105142123.95030-1-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
rust/kernel/auxiliary.rs
samples/rust/rust_driver_auxiliary.rs

index 56f3c180e8f694d5c9d6da8bb9147a047cfbd750..f8273cf165dc860722d9252702b758c35c869b65 100644 (file)
@@ -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.
index 1e4fb23cfcb0d2ce55e876f7e7bf9d89e13ccc90..f148124fe81fb2adf5545eb3a87d4b0e0e5c0d48 100644 (file)
@@ -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;