[PATCH] block: rnull: use vertical import style
From: Guru Das Srinagesh
Date: Sun Jul 05 2026 - 21:37:42 EST
Convert `use` imports to vertical layout for better readability and
maintainability.
Signed-off-by: Guru Das Srinagesh <linux@xxxxxxxxxxx>
---
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/20260628-b4-rust-vertical-imports-v1-0-98bc71d4810b@xxxxxxxxxxx/
[1]: https://lore.kernel.org/lkml/20260705-rfl-vert-imp-v1-1-2f07946a905f@xxxxxxxxxxx/
---
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 <linux@xxxxxxxxxxx>