[PATCH v12 21/22] gpu: nova-core: mm: pramin: drop useless as_ref() in run_self_test

Joel Fernandes
2026-04-25T21:16:00Z

`pdev` is already `&device::Device<device::Bound>`, so calling `.as_ref()`
on it just returns the same reference. Bind `dev` to `pdev` directly to
silence the `clippy::useless_asref` warning.

Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
---
drivers/gpu/nova-core/mm/pramin.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/nova-core/mm/pramin.rs b/drivers/gpu/nova-core/mm/pramin.rs
index 6a62cb5aaf53..e967cababac2 100644
--- a/drivers/gpu/nova-core/mm/pramin.rs
+++ b/drivers/gpu/nova-core/mm/pramin.rs
@@ -479,7 +479,7 @@ pub(crate) fn run_self_test(
) -> Result {
use crate::gpu::Architecture;

- let dev = pdev.as_ref();
+ let dev = pdev;

// PRAMIN uses NV_PBUS_BAR0_WINDOW which is only available on pre-Hopper GPUs.
// Hopper+ uses NV_XAL_EP_BAR0_WINDOW instead, requiring a separate HAL that
--
2.34.1