[PATCH v3 1/7] rust: miscdevice: use vertical import style

0 views
Skip to first unread message

Alvin Sun

unread,
May 21, 2026, 2:57:15 AM (4 days ago) May 21
to Arnd Bergmann, Greg Kroah-Hartman, Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross, Danilo Krummrich, Jens Axboe, Brendan Higgins, David Gow, Rae Moar, rust-fo...@vger.kernel.org, linux...@vger.kernel.org, linux-k...@vger.kernel.org, kuni...@googlegroups.com, Alvin Sun, Onur Özkan
Convert `use` imports to vertical layout for better readability and
maintainability.

Reviewed-by: Onur Özkan <wo...@onurozkan.dev>
Signed-off-by: Alvin Sun <alvi...@linux.dev>
---
rust/kernel/miscdevice.rs | 34 ++++++++++++++++++++++++++++------
1 file changed, 28 insertions(+), 6 deletions(-)

diff --git a/rust/kernel/miscdevice.rs b/rust/kernel/miscdevice.rs
index c3c2052c92069..05a6b6b9770f2 100644
--- a/rust/kernel/miscdevice.rs
+++ b/rust/kernel/miscdevice.rs
@@ -11,16 +11,38 @@
use crate::{
bindings,
device::Device,
- error::{to_result, Error, Result, VTABLE_DEFAULT_ERROR},
- ffi::{c_int, c_long, c_uint, c_ulong},
- fs::{File, Kiocb},
- iov::{IovIterDest, IovIterSource},
+ error::{
+ to_result,
+ Error,
+ Result,
+ VTABLE_DEFAULT_ERROR, //
+ },
+ ffi::{
+ c_int,
+ c_long,
+ c_uint,
+ c_ulong, //
+ },
+ fs::{
+ File,
+ Kiocb, //
+ },
+ iov::{
+ IovIterDest,
+ IovIterSource, //
+ },
mm::virt::VmaNew,
prelude::*,
seq_file::SeqFile,
- types::{ForeignOwnable, Opaque},
+ types::{
+ ForeignOwnable,
+ Opaque, //
+ },
+};
+use core::{
+ marker::PhantomData,
+ pin::Pin, //
};
-use core::{marker::PhantomData, pin::Pin};

/// Options for creating a misc device.
#[derive(Copy, Clone)]

--
2.43.0


Reply all
Reply to author
Forward
0 new messages