From: Alvin Sun <alvin.sun@linux.dev>
To: "Arnd Bergmann" <arnd@arndb.de>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>
Cc: rust-for-linux@vger.kernel.org, Alvin Sun <alvin.sun@linux.dev>
Subject: [PATCH 1/2] rust: miscdevice: use vertical import style
Date: Tue, 19 May 2026 13:34:41 +0800 [thread overview]
Message-ID: <20260519-miscdev-use-format-v1-1-11d526ba0edc@linux.dev> (raw)
In-Reply-To: <20260519-miscdev-use-format-v1-0-11d526ba0edc@linux.dev>
Convert `use` imports to vertical layout for better readability and
maintainability.
Signed-off-by: Alvin Sun <alvin.sun@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
next prev parent reply other threads:[~2026-05-19 5:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 5:34 [PATCH 0/2] rust: use vertical import style in miscdevice Alvin Sun
2026-05-19 5:34 ` Alvin Sun [this message]
2026-05-19 5:58 ` [PATCH 1/2] rust: miscdevice: use vertical import style Miguel Ojeda
2026-05-19 6:37 ` Alvin Sun
2026-05-19 5:34 ` [PATCH 2/2] samples: rust_misc_device: " Alvin Sun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260519-miscdev-use-format-v1-1-11d526ba0edc@linux.dev \
--to=alvin.sun@linux.dev \
--cc=a.hindborg@kernel.org \
--cc=aliceryhl@google.com \
--cc=arnd@arndb.de \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=gregkh@linuxfoundation.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox