mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexandre Courbot <acourbot@nvidia.com>
To: Danilo Krummrich <dakr@kernel.org>,
	Alice Ryhl <aliceryhl@google.com>,
	 David Airlie <airlied@gmail.com>,
	Simona Vetter <simona@ffwll.ch>,
	 John Hubbard <jhubbard@nvidia.com>
Cc: nova-gpu@lists.linux.dev, rust-for-linux@vger.kernel.org,
	 dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	 kernel test robot <lkp@intel.com>,
	Alexandre Courbot <acourbot@nvidia.com>
Subject: [PATCH] gpu: nova-core: fix warning with NOVA_CORE_SELFTESTS disabled
Date: Sun, 04 Oct 2026 10:00:49 +0900	[thread overview]
Message-ID: <20261004-nova-int-fixup-v1-1-9e4bce097f94@nvidia.com> (raw)

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@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202610031630.JOlyp48X-lkp@intel.com/
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
 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@nvidia.com>


             reply	other threads:[~2026-10-04  1:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-04  1:00 Alexandre Courbot [this message]
2026-10-04  3:49 ` John Hubbard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261004-nova-int-fixup-v1-1-9e4bce097f94@nvidia.com \
    --to=acourbot@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=nova-gpu@lists.linux.dev \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=simona@ffwll.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®