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: use warn_on_err macro Date: Thu, 23 Apr 2026 07:34:42 +1000 Message-ID: In-Reply-To: <20260422-nova-unload-v3-2-1d2c81bd3ced@nvidia.com> References: <20260422-nova-unload-v3-0-1d2c81bd3ced@nvidia.com> <20260422-nova-unload-v3-2-1d2c81bd3ced@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 **Status: Looks good** Clean refactor of the `unbind` method: ```rust - kernel::warn_on!(self - .bar - .access(dev) - .inspect(|bar| self.sysmem_flush.unregister(bar)) - .is_err()); + let Ok(bar) = kernel::warn_on_err!(self.bar.access(dev)) else { + return; + }; + + self.sysmem_flush.unregister(bar); ``` This is a meaningful improvement. The old code used `inspect` to perform a side-effect (unregister) inside a chain, which is harder to read and doesn't allow adding more steps between `bar.access()` and the end of the function. The new early-return pattern is idiomatic Rust and prepares for the additional unload logic added in patches 5 and 6. --- Generated by Claude Code Patch Reviewer