[PATCH] gpu: nova-core: fix warning with NOVA_CORE_SELFTESTS disabled
From: Alexandre Courbot
Date: Sat Oct 03 2026 - 21:01:23 EST
A module-wide new import becomes unused if the `NOVA_CORE_SELFTESTS`
config option is disabled:
warning: unused import: `Spec`
--> ../drivers/gpu/nova-core/driver.rs:29:9
|
29 | Spec, //
| ^^^^
|
Fix this by fully qualifying the unique use of `Spec` when the tests are
enabled.
Fixes: 9cb3f5d56e81 ("gpu: nova-core: add an interrupt delivery self-test")
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-kbuild-all/202610031630.JOlyp48X-lkp@xxxxxxxxx/
Signed-off-by: Alexandre Courbot <acourbot@xxxxxxxxxx>
---
drivers/gpu/nova-core/driver.rs | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/nova-core/driver.rs b/drivers/gpu/nova-core/driver.rs
index d195fd2bcf8c..560a70c4f5a7 100644
--- a/drivers/gpu/nova-core/driver.rs
+++ b/drivers/gpu/nova-core/driver.rs
@@ -24,10 +24,7 @@
use crate::{
api::NovaCoreApi,
- gpu::{
- Gpu,
- Spec, //
- }, //
+ gpu::Gpu, //
};
/// Counter for generating unique auxiliary device IDs.
@@ -121,7 +118,7 @@ fn probe<'bound>(
// Run self-tests that do not depend on the `Gpu` instance.
#[cfg(CONFIG_NOVA_CORE_SELFTESTS)]
_: {
- let spec = Spec::new(pdev.as_ref(), bar)?;
+ let spec = crate::gpu::Spec::new(pdev.as_ref(), bar)?;
// We must wait for GFW_BOOT completion before doing any significant setup on
// the GPU.
---
base-commit: df718311a84188e26d499301c3921e4c392d557e
change-id: 20261004-nova-int-fixup-4593b4d61084
Best regards,
--
Alexandre Courbot <acourbot@xxxxxxxxxx>