[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251029-nova-as-v3-2-6a30c7333ad9@nvidia.com>
Date: Wed, 29 Oct 2025 08:12:10 +0900
From: Alexandre Courbot <acourbot@...dia.com>
To: Alice Ryhl <aliceryhl@...gle.com>, David Airlie <airlied@...il.com>, 
 Simona Vetter <simona@...ll.ch>, Miguel Ojeda <ojeda@...nel.org>, 
 Alex Gaynor <alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>, 
 Gary Guo <gary@...yguo.net>, 
 Björn Roy Baron <bjorn3_gh@...tonmail.com>, 
 Benno Lossin <lossin@...nel.org>, Andreas Hindborg <a.hindborg@...nel.org>, 
 Trevor Gross <tmgross@...ch.edu>
Cc: John Hubbard <jhubbard@...dia.com>, 
 Alistair Popple <apopple@...dia.com>, 
 Joel Fernandes <joelagnelf@...dia.com>, Timur Tabi <ttabi@...dia.com>, 
 Edwin Peer <epeer@...dia.com>, nouveau@...ts.freedesktop.org, 
 dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org, 
 rust-for-linux@...r.kernel.org, Danilo Krummrich <dakr@...nel.org>, 
 Alexandre Courbot <acourbot@...dia.com>
Subject: [PATCH v3 2/6] gpu: nova-core: vbios: do not use `as` when
 comparing BiosImageType
Use the `image_type` method and compare its result to avoid using `as`.
Signed-off-by: Alexandre Courbot <acourbot@...dia.com>
---
 drivers/gpu/nova-core/vbios.rs | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/nova-core/vbios.rs b/drivers/gpu/nova-core/vbios.rs
index 74ed6d61e6cc..7c1bf10b2eac 100644
--- a/drivers/gpu/nova-core/vbios.rs
+++ b/drivers/gpu/nova-core/vbios.rs
@@ -709,9 +709,8 @@ fn image_type(&self) -> Result<BiosImageType> {
 
     /// Check if this is the last image.
     fn is_last(&self) -> bool {
-        // For NBSI images (type == 0x70), return true as they're
-        // considered the last image
-        if self.pcir.code_type == BiosImageType::Nbsi as u8 {
+        // For NBSI images, return true as they're considered the last image
+        if self.image_type() == Ok(BiosImageType::Nbsi) {
             return true;
         }
 
-- 
2.51.0
Powered by blists - more mailing lists
 
