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.rs | |
| parent | 1b89d4a6bb4cd7cfd7eb2e3621f04fda956e4ef3 (diff) | |
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.rs')
| -rw-r--r-- | rust/kernel/debugfs.rs | 46 |
1 files changed, 35 insertions, 11 deletions
diff --git a/rust/kernel/debugfs.rs b/rust/kernel/debugfs.rs index facad81e8290..536a320334bf 100644 --- a/rust/kernel/debugfs.rs +++ b/rust/kernel/debugfs.rs @@ -8,28 +8,52 @@ // When DebugFS is disabled, many parameters are dead. Linting for this isn't helpful. #![cfg_attr(not(CONFIG_DEBUG_FS), allow(unused_variables))] -use crate::fmt; -use crate::prelude::*; -use crate::str::CStr; #[cfg(CONFIG_DEBUG_FS)] use crate::sync::Arc; -use crate::uaccess::UserSliceReader; -use core::marker::PhantomData; -use core::marker::PhantomPinned; +use crate::{ + fmt, + prelude::*, + str::CStr, + uaccess::UserSliceReader, // +}; + #[cfg(CONFIG_DEBUG_FS)] use core::mem::ManuallyDrop; -use core::ops::Deref; +use core::{ + marker::{ + PhantomData, + PhantomPinned, // + }, + ops::Deref, +}; mod traits; -pub use traits::{BinaryReader, BinaryReaderMut, BinaryWriter, Reader, Writer}; +pub use traits::{ + BinaryReader, + BinaryReaderMut, + BinaryWriter, + Reader, + Writer, // +}; mod callback_adapters; -use callback_adapters::{FormatAdapter, NoWriter, WritableAdapter}; +use callback_adapters::{ + FormatAdapter, + NoWriter, + WritableAdapter, // +}; + mod file_ops; use file_ops::{ - BinaryReadFile, BinaryReadWriteFile, BinaryWriteFile, FileOps, ReadFile, ReadWriteFile, - WriteFile, + BinaryReadFile, + BinaryReadWriteFile, + BinaryWriteFile, + FileOps, + ReadFile, + ReadWriteFile, + WriteFile, // }; + #[cfg(CONFIG_DEBUG_FS)] mod entry; #[cfg(CONFIG_DEBUG_FS)] |
