diff options
| author | Danilo Krummrich <dakr@kernel.org> | 2025-12-18 17:56:11 +0100 |
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2025-12-22 17:04:07 +0100 |
| commit | 9202cef05d6b61a03475b744c7f0622cd8be8e90 (patch) | |
| tree | 850479b0584be79302524094098f1ce7ad62a8a4 /rust/kernel/debugfs/traits.rs | |
| parent | 1b89d4a6bb4cd7cfd7eb2e3621f04fda956e4ef3 (diff) | |
| download | linux-9202cef05d6b61a03475b744c7f0622cd8be8e90.tar.gz linux-9202cef05d6b61a03475b744c7f0622cd8be8e90.zip | |
rust: debugfs: use "kernel vertical" style for imports
Convert all imports in the debugfs Rust module 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
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/20251218165626.450264-1-dakr@kernel.org
[ Apply the same change to the debugfs sample code. - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'rust/kernel/debugfs/traits.rs')
| -rw-r--r-- | rust/kernel/debugfs/traits.rs | 43 |
1 files changed, 32 insertions, 11 deletions
diff --git a/rust/kernel/debugfs/traits.rs b/rust/kernel/debugfs/traits.rs index 3eee60463fd5..8c39524b6a99 100644 --- a/rust/kernel/debugfs/traits.rs +++ b/rust/kernel/debugfs/traits.rs @@ -3,17 +3,38 @@ //! Traits for rendering or updating values exported to DebugFS. -use crate::alloc::Allocator; -use crate::fmt; -use crate::fs::file; -use crate::prelude::*; -use crate::sync::atomic::{Atomic, AtomicBasicOps, AtomicType, Relaxed}; -use crate::sync::Arc; -use crate::sync::Mutex; -use crate::transmute::{AsBytes, FromBytes}; -use crate::uaccess::{UserSliceReader, UserSliceWriter}; -use core::ops::{Deref, DerefMut}; -use core::str::FromStr; +use crate::{ + alloc::Allocator, + fmt, + fs::file, + prelude::*, + sync::{ + atomic::{ + Atomic, + AtomicBasicOps, + AtomicType, + Relaxed, // + }, + Arc, + Mutex, // + }, + transmute::{ + AsBytes, + FromBytes, // + }, + uaccess::{ + UserSliceReader, + UserSliceWriter, // + }, +}; + +use core::{ + ops::{ + Deref, + DerefMut, // + }, + str::FromStr, +}; /// A trait for types that can be written into a string. /// |
