From: Alexandre Courbot Date: Tue, 28 Oct 2025 23:12:10 +0000 (+0900) Subject: gpu: nova-core: vbios: do not use `as` when comparing BiosImageType X-Git-Tag: v6.19-rc1~157^2~8^2~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=505c3ec507a7eb4bbaef9aa8b13b6452e86baca2;p=thirdparty%2Fkernel%2Flinux.git gpu: nova-core: vbios: do not use `as` when comparing BiosImageType Use the `image_type` method and compare its result to avoid using `as`. Reviewed-by: Joel Fernandes Signed-off-by: Alexandre Courbot Message-ID: <20251029-nova-as-v3-2-6a30c7333ad9@nvidia.com> --- diff --git a/drivers/gpu/nova-core/vbios.rs b/drivers/gpu/nova-core/vbios.rs index 74ed6d61e6cc7..9283921e89c3b 100644 --- a/drivers/gpu/nova-core/vbios.rs +++ b/drivers/gpu/nova-core/vbios.rs @@ -709,9 +709,8 @@ impl BiosImage { /// 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; }