From: "Onur Özkan" <work@onurozkan.dev>
To: Alvin Sun <alvin.sun@linux.dev>
Cc: "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>,
rust-for-linux@vger.kernel.org, linux-block@vger.kernel.org,
"Onur Özkan" <work@onurozkan.dev>
Subject: Re: [PATCH v2 4/5] rust: block: mq: use vertical import style
Date: Wed, 20 May 2026 05:59:20 +0300 [thread overview]
Message-ID: <20260520025922.35078-1-work@onurozkan.dev> (raw)
In-Reply-To: <20260520-miscdev-use-format-v2-4-64dc48fc1345@linux.dev>
On Wed, 20 May 2026 10:40:11 +0800
Alvin Sun <alvin.sun@linux.dev> wrote:
> Convert `use` imports to vertical layout for better readability and
> maintainability.
>
> Signed-off-by: Alvin Sun <alvin.sun@linux.dev>
Reviewed-by: Onur Özkan <work@onurozkan.dev>
> ---
> rust/kernel/block/mq/gen_disk.rs | 21 +++++++++++++++++----
> rust/kernel/block/mq/operations.rs | 17 +++++++++++++----
> rust/kernel/block/mq/request.rs | 12 +++++++++---
> rust/kernel/block/mq/tag_set.rs | 24 +++++++++++++++++++-----
> 4 files changed, 58 insertions(+), 16 deletions(-)
>
> diff --git a/rust/kernel/block/mq/gen_disk.rs b/rust/kernel/block/mq/gen_disk.rs
> index 912cb805caf51..6f599f654f37f 100644
> --- a/rust/kernel/block/mq/gen_disk.rs
> +++ b/rust/kernel/block/mq/gen_disk.rs
> @@ -7,14 +7,27 @@
>
> use crate::{
> bindings,
> - block::mq::{Operations, TagSet},
> - error::{self, from_err_ptr, Result},
> - fmt::{self, Write},
> + block::mq::{
> + Operations,
> + TagSet, //
> + },
> + error::{
> + self,
> + from_err_ptr,
> + Result, //
> + },
> + fmt::{
> + self,
> + Write, //
> + },
> prelude::*,
> static_lock_class,
> str::NullTerminatedFormatter,
> sync::Arc,
> - types::{ForeignOwnable, ScopeGuard},
> + types::{
> + ForeignOwnable,
> + ScopeGuard, //
> + },
> };
>
> /// A builder for [`GenDisk`].
> diff --git a/rust/kernel/block/mq/operations.rs b/rust/kernel/block/mq/operations.rs
> index 8ad46129a52c4..187b0b7791db9 100644
> --- a/rust/kernel/block/mq/operations.rs
> +++ b/rust/kernel/block/mq/operations.rs
> @@ -6,11 +6,20 @@
>
> use crate::{
> bindings,
> - block::mq::{request::RequestDataWrapper, Request},
> - error::{from_result, Result},
> + block::mq::{
> + request::RequestDataWrapper,
> + Request, //
> + },
> + error::{
> + from_result,
> + Result, //
> + },
> prelude::*,
> - sync::{aref::ARef, Refcount},
> - types::ForeignOwnable,
> + sync::{
> + aref::ARef,
> + Refcount, //
> + },
> + types::ForeignOwnable, //
> };
> use core::marker::PhantomData;
>
> diff --git a/rust/kernel/block/mq/request.rs b/rust/kernel/block/mq/request.rs
> index ce3e30c81cb5e..4e0579660e906 100644
> --- a/rust/kernel/block/mq/request.rs
> +++ b/rust/kernel/block/mq/request.rs
> @@ -9,13 +9,19 @@
> block::mq::Operations,
> error::Result,
> sync::{
> - aref::{ARef, AlwaysRefCounted},
> + aref::{
> + ARef,
> + AlwaysRefCounted, //
> + },
> atomic::Relaxed,
> - Refcount,
> + Refcount, //
> },
> types::Opaque,
> };
> -use core::{marker::PhantomData, ptr::NonNull};
> +use core::{
> + marker::PhantomData,
> + ptr::NonNull, //
> +};
>
> /// A wrapper around a blk-mq [`struct request`]. This represents an IO request.
> ///
> diff --git a/rust/kernel/block/mq/tag_set.rs b/rust/kernel/block/mq/tag_set.rs
> index dae9df408a862..c1fd3e047af50 100644
> --- a/rust/kernel/block/mq/tag_set.rs
> +++ b/rust/kernel/block/mq/tag_set.rs
> @@ -8,13 +8,27 @@
>
> use crate::{
> bindings,
> - block::mq::{operations::OperationsVTable, request::RequestDataWrapper, Operations},
> - error::{self, Result},
> + block::mq::{
> + operations::OperationsVTable,
> + request::RequestDataWrapper,
> + Operations, //
> + },
> + error::{
> + self,
> + Result, //
> + },
> prelude::try_pin_init,
> - types::Opaque,
> + types::Opaque, //
> +};
> +use core::{
> + convert::TryInto,
> + marker::PhantomData, //
> +};
> +use pin_init::{
> + pin_data,
> + pinned_drop,
> + PinInit, //
> };
> -use core::{convert::TryInto, marker::PhantomData};
> -use pin_init::{pin_data, pinned_drop, PinInit};
>
> /// A wrapper for the C `struct blk_mq_tag_set`.
> ///
>
> --
> 2.43.0
>
>
next prev parent reply other threads:[~2026-05-20 2:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 2:40 [PATCH v2 0/5] rust: use vertical import style and remove redundant imports Alvin Sun
2026-05-20 2:40 ` [PATCH v2 1/5] rust: miscdevice: use vertical import style Alvin Sun
2026-05-20 2:57 ` Onur Özkan
2026-05-20 2:40 ` [PATCH v2 2/5] samples: rust_misc_device: " Alvin Sun
2026-05-20 2:58 ` Onur Özkan
2026-05-20 2:40 ` [PATCH v2 3/5] rust: miscdevice: remove redundant imports Alvin Sun
2026-05-20 2:59 ` Onur Özkan
2026-05-20 2:40 ` [PATCH v2 4/5] rust: block: mq: use vertical import style Alvin Sun
2026-05-20 2:59 ` Onur Özkan [this message]
2026-05-20 2:40 ` [PATCH v2 5/5] rust: block: mq: remove redundant imports and format Alvin Sun
2026-05-20 2:59 ` Onur Özkan
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=20260520025922.35078-1-work@onurozkan.dev \
--to=work@onurozkan.dev \
--cc=a.hindborg@kernel.org \
--cc=aliceryhl@google.com \
--cc=alvin.sun@linux.dev \
--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=linux-block@vger.kernel.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