* [PATCH] drm: nova-drm: use vertical import style
@ 2026-07-06 3:18 Guru Das Srinagesh
2026-07-06 3:24 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Guru Das Srinagesh @ 2026-07-06 3:18 UTC (permalink / raw)
To: Danilo Krummrich, Alice Ryhl, David Airlie, Simona Vetter
Cc: nova-gpu, dri-devel, linux-kernel, Guru Das Srinagesh
Convert `use` imports to vertical layout for better readability and
maintainability.
Signed-off-by: Guru Das Srinagesh <linux@gurudas.dev>
---
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"
$
[0]: https://lore.kernel.org/lkml/20260628-b4-rust-vertical-imports-v1-0-98bc71d4810b@gurudas.dev/
---
drivers/gpu/drm/nova/file.rs | 10 ++++++++--
drivers/gpu/drm/nova/gem.rs | 11 +++++++++--
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/nova/file.rs b/drivers/gpu/drm/nova/file.rs
index a3b7bd36792c..547da5caa58d 100644
--- a/drivers/gpu/drm/nova/file.rs
+++ b/drivers/gpu/drm/nova/file.rs
@@ -1,10 +1,16 @@
// SPDX-License-Identifier: GPL-2.0
-use crate::driver::{NovaDevice, NovaDriver};
+use crate::driver::{
+ NovaDevice,
+ NovaDriver, //
+};
use crate::gem::NovaObject;
use kernel::{
alloc::flags::*,
- drm::{self, gem::BaseObject},
+ drm::{
+ self,
+ gem::BaseObject, //
+ },
pci,
prelude::*,
uapi,
diff --git a/drivers/gpu/drm/nova/gem.rs b/drivers/gpu/drm/nova/gem.rs
index 9d8ff7de2c0f..8d8980425737 100644
--- a/drivers/gpu/drm/nova/gem.rs
+++ b/drivers/gpu/drm/nova/gem.rs
@@ -2,14 +2,21 @@
use kernel::{
drm,
- drm::{gem, gem::BaseObject, DeviceContext},
+ drm::{
+ gem,
+ gem::BaseObject,
+ DeviceContext, //
+ },
page,
prelude::*,
sync::aref::ARef,
};
use crate::{
- driver::{NovaDevice, NovaDriver},
+ driver::{
+ NovaDevice,
+ NovaDriver, //
+ },
file::File,
};
---
base-commit: 78900738d981c97aad929e33620340d0d9bcfc82
change-id: 20260705-drm-vert-imp-8f4d1a46e4dc
Best regards,
--
Guru Das Srinagesh <linux@gurudas.dev>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm: nova-drm: use vertical import style
2026-07-06 3:18 [PATCH] drm: nova-drm: use vertical import style Guru Das Srinagesh
@ 2026-07-06 3:24 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-07-06 3:24 UTC (permalink / raw)
To: Guru Das Srinagesh; +Cc: Danilo Krummrich, dri-devel, Alexandre Courbot
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Incomplete vertical import conversion and unmerged import paths.
--
commit 4005a285946c405f71ba0fa91578531ee7637244
Author: Guru Das Srinagesh <linux@gurudas.dev>
drm: nova-drm: use vertical import style
This commit converts the module imports to a vertical layout to improve
readability and maintainability.
> diff --git a/drivers/gpu/drm/nova/file.rs b/drivers/gpu/drm/nova/file.rs
> index a3b7bd36792c1..547da5caa58db 100644
> --- a/drivers/gpu/drm/nova/file.rs
> +++ b/drivers/gpu/drm/nova/file.rs
> @@ -1,10 +1,16 @@
> // SPDX-License-Identifier: GPL-2.0
>
> -use crate::driver::{NovaDevice, NovaDriver};
> +use crate::driver::{
> + NovaDevice,
> + NovaDriver, //
> +};
> use crate::gem::NovaObject;
> use kernel::{
> alloc::flags::*,
> - drm::{self, gem::BaseObject},
> + drm::{
> + self,
> + gem::BaseObject, //
> + },
> pci,
> prelude::*,
> uapi,
> };
[Severity: Low]
This isn't a bug, but does the kernel::{...} block need a trailing //
after uapi, to ensure rustfmt preserves the vertical formatting?
> diff --git a/drivers/gpu/drm/nova/gem.rs b/drivers/gpu/drm/nova/gem.rs
> index 9d8ff7de2c0f7..8d89804257371 100644
> --- a/drivers/gpu/drm/nova/gem.rs
> +++ b/drivers/gpu/drm/nova/gem.rs
> @@ -2,14 +2,21 @@
>
> use kernel::{
> drm,
> - drm::{gem, gem::BaseObject, DeviceContext},
> + drm::{
> + gem,
> + gem::BaseObject,
> + DeviceContext, //
> + },
[Severity: Low]
Could these drm and gem imports be merged? For instance, they might be
combined into a single drm::{self, gem::{self, BaseObject}, DeviceContext, //}
block to avoid redundant paths.
> page,
> prelude::*,
> sync::aref::ARef,
> };
[Severity: Low]
Similar to the file.rs changes, does this outermost block need a trailing //
after sync::aref::ARef, to maintain the vertical style when formatted?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260705-drm-vert-imp-v1-1-c7b24e290763@gurudas.dev?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-06 3:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-06 3:18 [PATCH] drm: nova-drm: use vertical import style Guru Das Srinagesh
2026-07-06 3:24 ` sashiko-bot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.