Re: [PATCH] block: rnull: use vertical import style

Link Mauve <[email protected]>
Newsgroups dev.linux.lists.llvm,org.kernel.vger.linux-block,org.kernel.vger.linux-kernel,org.kernel.vger.rust-for-linux
Message-ID <ak3-_Y0p1D7YnitH@luna>
On Sun, Jul 05, 2026 at 06:36:48PM -0700, Guru Das Srinagesh wrote:
> Convert `use` imports to vertical layout for better readability and
> maintainability.
> 
> Signed-off-by: Guru Das Srinagesh <[email protected]>

This one is:
Reviewed-by: Link Mauve <[email protected]>

Thanks!

> ---
> Came across a recent commit bc58905eb07 ("samples: rust_misc_device: use
> vertical import style") and found a few more locations that could
> benefit from this cleanup. No functional changes.
> 
> Separating out patches per-subsystem as per the review feedback in [0].
> 
> Tested via:
> 
> 	$ make LLVM=1 rustfmtcheck || echo "fail"
> 	$
> 
> Initially thought that rust-for-linux/rust-block-next was the right base
> branch to use, which is why I didn't group this with [1] based on
> rust-next that I sent out a short while ago. Using rust-next as base for
> this patch.
> 
> [0]: https://lore.kernel.org/lkml/[email protected]/
> [1]: https://lore.kernel.org/lkml/[email protected]/
> ---
>  drivers/block/rnull/configfs.rs | 25 ++++++++++++++++++++-----
>  drivers/block/rnull/rnull.rs    | 13 ++++++++++---
>  2 files changed, 30 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/block/rnull/configfs.rs b/drivers/block/rnull/configfs.rs
> index 7c2eb5c0b722..2149b47db697 100644
> --- a/drivers/block/rnull/configfs.rs
> +++ b/drivers/block/rnull/configfs.rs
> @@ -1,15 +1,30 @@
>  // SPDX-License-Identifier: GPL-2.0
>  
> -use super::{NullBlkDevice, THIS_MODULE};
> +use super::{
> +    NullBlkDevice,
> +    THIS_MODULE, //
> +};
>  use kernel::{
> -    block::mq::gen_disk::{GenDisk, GenDiskBuilder},
> -    configfs::{self, AttributeOperations},
> +    block::mq::gen_disk::{
> +        GenDisk,
> +        GenDiskBuilder, //
> +    },
> +    configfs::{
> +        self,
> +        AttributeOperations, //
> +    },
>      configfs_attrs,
> -    fmt::{self, Write as _},
> +    fmt::{
> +        self,
> +        Write as _, //
> +    },
>      new_mutex,
>      page::PAGE_SIZE,
>      prelude::*,
> -    str::{kstrtobool_bytes, CString},
> +    str::{
> +        kstrtobool_bytes,
> +        CString, //
> +    },
>      sync::Mutex,
>  };
>  
> diff --git a/drivers/block/rnull/rnull.rs b/drivers/block/rnull/rnull.rs
> index 0ca8715febe8..d58d2c4c5f63 100644
> --- a/drivers/block/rnull/rnull.rs
> +++ b/drivers/block/rnull/rnull.rs
> @@ -10,12 +10,19 @@
>          self,
>          mq::{
>              self,
> -            gen_disk::{self, GenDisk},
> -            Operations, TagSet,
> +            gen_disk::{
> +                self,
> +                GenDisk, //
> +            },
> +            Operations,
> +            TagSet, //
>          },
>      },
>      prelude::*,
> -    sync::{aref::ARef, Arc},
> +    sync::{
> +        aref::ARef,
> +        Arc, //
> +    },
>  };
>  
>  module! {
> 
> ---
> base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
> change-id: 20260705-rfl-vert-imp-2-9bba7706d3f0
> 
> Best regards,
> --  
> Guru Das Srinagesh <[email protected]>
> 
> 

-- 
Link Mauve
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.