Re: [PATCH v4 01/20] gpu: nova-core: vbios: stop scanning at BIOS_MAX_SCAN_LEN

From: John Hubbard

Date: Fri May 22 2026 - 22:48:15 EST


On 5/18/26 7:54 PM, Eliot Courtney wrote:
> Current code lets `current_offset` go to `BIOS_MAX_SCAN_LEN` which is
> one byte too far.
>
> Fixes: 6fda04e7f0cd ("gpu: nova-core: vbios: Add base support for VBIOS construction and iteration")
> Reviewed-by: Joel Fernandes <joelagnelf@xxxxxxxxxx>
> Signed-off-by: Eliot Courtney <ecourtney@xxxxxxxxxx>
> ---
> drivers/gpu/nova-core/vbios.rs | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/nova-core/vbios.rs b/drivers/gpu/nova-core/vbios.rs
> index 6bcfb6c5cf44..7bec81a37340 100644
> --- a/drivers/gpu/nova-core/vbios.rs
> +++ b/drivers/gpu/nova-core/vbios.rs
> @@ -272,7 +272,7 @@ fn next(&mut self) -> Option<Self::Item> {
> return None;
> }
>
> - if self.current_offset > BIOS_MAX_SCAN_LEN {
> + if self.current_offset >= BIOS_MAX_SCAN_LEN {
> dev_err!(self.dev, "Error: exceeded BIOS scan limit, stopping scan\n");
> return None;
> }
>

Reviewed-by: John Hubbard <jhubbard@xxxxxxxxxx>

thanks,
--
John Hubbard