On 10/4/26 3:00 AM, Alexandre Courbot wrote:
> 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 <[email protected]>
> Closes: 
> https://lore.kernel.org/oe-kbuild-all/[email protected]/
> Signed-off-by: Alexandre Courbot <[email protected]>
> ---
>  drivers/gpu/nova-core/driver.rs | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 

Reviewed-by: John Hubbard <[email protected]>


thanks,
-- 
John Hubbard

> 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 <[email protected]>



Reply via email to