]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rust/drm: Fixup import styles
authorLyude Paul <lyude@redhat.com>
Thu, 22 Jan 2026 21:43:02 +0000 (16:43 -0500)
committerDanilo Krummrich <dakr@kernel.org>
Tue, 24 Feb 2026 15:10:09 +0000 (16:10 +0100)
This is to match
  https://docs.kernel.org/rust/coding-guidelines.html#imports

There should be no functional changes in this patch.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patch.msgid.link/20260122214316.3281257-1-lyude@redhat.com
[ Move trailing `//` at the end. - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
rust/kernel/drm/device.rs
rust/kernel/drm/driver.rs
rust/kernel/drm/file.rs
rust/kernel/drm/gem/mod.rs

index 3ce8f62a00569646197ed4d8722082a3e58024bd..ae123ffece7906a28e51220f6ceea069fa6ed31f 100644 (file)
@@ -6,15 +6,32 @@
 
 use crate::{
     alloc::allocator::Kmalloc,
-    bindings, device, drm,
-    drm::driver::AllocImpl,
-    error::from_err_ptr,
-    error::Result,
+    bindings,
+    device,
+    drm::{
+        self,
+        driver::AllocImpl, //
+    },
+    error::{
+        from_err_ptr,
+        Result, //
+    },
     prelude::*,
-    sync::aref::{ARef, AlwaysRefCounted},
-    types::Opaque,
+    sync::aref::{
+        ARef,
+        AlwaysRefCounted, //
+    },
+    types::Opaque, //
+};
+use core::{
+    alloc::Layout,
+    mem,
+    ops::Deref,
+    ptr::{
+        self,
+        NonNull, //
+    },
 };
-use core::{alloc::Layout, mem, ops::Deref, ptr, ptr::NonNull};
 
 #[cfg(CONFIG_DRM_LEGACY)]
 macro_rules! drm_legacy_fields {
index e09f977b5b519ef7c491ceabe89f2973c2ac5885..6bd097f16ce73df2fab39e02ad6e61ed6912d4db 100644 (file)
@@ -5,10 +5,16 @@
 //! C header: [`include/drm/drm_drv.h`](srctree/include/drm/drm_drv.h)
 
 use crate::{
-    bindings, device, devres, drm,
-    error::{to_result, Result},
+    bindings,
+    device,
+    devres,
+    drm,
+    error::{
+        to_result,
+        Result, //
+    },
     prelude::*,
-    sync::aref::ARef,
+    sync::aref::ARef, //
 };
 use macros::vtable;
 
index 8c46f8d519516a4fb5059927b58ba554beba63b2..7dade6dfa1ba2ebf33003033b751dc7115e4a316 100644 (file)
@@ -4,9 +4,17 @@
 //!
 //! C header: [`include/drm/drm_file.h`](srctree/include/drm/drm_file.h)
 
-use crate::{bindings, drm, error::Result, prelude::*, types::Opaque};
-use core::marker::PhantomData;
-use core::pin::Pin;
+use crate::{
+    bindings,
+    drm,
+    error::Result,
+    prelude::*,
+    types::Opaque, //
+};
+use core::{
+    marker::PhantomData,
+    pin::Pin, //
+};
 
 /// Trait that must be implemented by DRM drivers to represent a DRM File (a client instance).
 pub trait DriverFile {
index d49a9ba026356c037c4b18a6be979ebd430703a4..56b7641b1405ec0156cbb5754fd690a220f4fedc 100644 (file)
@@ -6,14 +6,29 @@
 
 use crate::{
     alloc::flags::*,
-    bindings, drm,
-    drm::driver::{AllocImpl, AllocOps},
-    error::{to_result, Result},
+    bindings,
+    drm::{
+        self,
+        driver::{
+            AllocImpl,
+            AllocOps, //
+        },
+    },
+    error::{
+        to_result,
+        Result, //
+    },
     prelude::*,
-    sync::aref::{ARef, AlwaysRefCounted},
+    sync::aref::{
+        ARef,
+        AlwaysRefCounted, //
+    },
     types::Opaque,
 };
-use core::{ops::Deref, ptr::NonNull};
+use core::{
+    ops::Deref,
+    ptr::NonNull, //
+};
 
 /// A type alias for retrieving a [`Driver`]s [`DriverFile`] implementation from its
 /// [`DriverObject`] implementation.