From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: gpu: nova-core: vbios: compute FWSEC-relative Falcon data offset Date: Thu, 23 Apr 2026 08:42:25 +1000 Message-ID: In-Reply-To: <20260421-fix-vbios-v3-8-8f648aef7a85@nvidia.com> References: <20260421-fix-vbios-v3-0-8f648aef7a85@nvidia.com> <20260421-fix-vbios-v3-8-8f648aef7a85@nvidia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review Good refactoring. Renames `falcon_data_ptr` to `falcon_data_offset` and folds the PCI-AT-length subtraction into the function, making the return value directly usable as a FWSEC-relative offset. The function also gains proper bounds checking via `.get()` and `u32::from_bytes_copy_prefix` instead of the manual slice-to-array conversion. The new bounds check is correct: ```rust usize::from_safe_cast(ptr) .checked_sub(data.len()) .ok_or(EINVAL) ``` This replaces the old check `if (usize::from_safe_cast(data_ptr)) < self.base.data.len()` which would error if the pointer was *within* the PCI-AT image (meaning it doesn't point to FWSEC data). The semantics are the same. No issues. --- Generated by Claude Code Patch Reviewer