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: gsp: unconditionally call variable payload handling Date: Thu, 19 Feb 2026 18:43:08 +1000 Message-ID: In-Reply-To: <20260219-cmdq-continuation-v2-6-2e8b7615536f@nvidia.com> References: <20260219-cmdq-continuation-v2-0-2e8b7615536f@nvidia.com> <20260219-cmdq-continuation-v2-6-2e8b7615536f@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 > - // Fill the variable-length payload. > - if command_size > size_of::() { > - let mut sbuffer = > - SBufferIter::new_writer([&mut payload_1[..], &mut dst.contents.1[..]]); > - command.init_variable_payload(&mut sbuffer)?; > - > - if !sbuffer.is_empty() { > - return Err(EIO); > - } > + // Fill the variable-length payload, which may be empty. > + let mut sbuffer = SBufferIter::new_writer([&mut payload_1[..], &mut dst.contents.1[..]]); > + command.init_variable_payload(&mut sbuffer)?; > + > + if !sbuffer.is_empty() { > + return Err(EIO); > } > + drop(sbuffer); The conditional was guarding a no-op path (when there's no variable payload, `init_variable_payload` does nothing and the `SBufferIter` with zero remaining bytes would pass the `is_empty` check). Removing the conditional simplifies the code and the `drop(sbuffer)` is needed to end the mutable borrow before the checksum computation accesses `dst.contents`. No issues. --- Generated by Claude Code Patch Reviewer