From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: rust: drm: gem/shmem: Add DmaResvGuard helper Date: Thu, 04 Jun 2026 16:06:43 +1000 Message-ID: In-Reply-To: <20260529183702.677677-3-lyude@redhat.com> References: <20260529183702.677677-1-lyude@redhat.com> <20260529183702.677677-3-lyude@redhat.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: Minor observations** The guard pattern is correct for wrapping `dma_resv_lock` / `dma_resv_unlock`. The return value of `dma_resv_lock` is discarded: ```rust unsafe { bindings::dma_resv_lock(obj.raw_dma_resv(), ptr::null_mut()) }; ``` With a NULL `ww_acquire_ctx`, this reduces to a plain mutex lock which cannot fail (just blocks), so discarding the return value is fine in practice. The `#[expect(unused)]` attribute is appropriate since it's only used starting in patch 3. The TODO note about replacing this with proper WwMutex bindings is good forward-looking guidance. --- Generated by Claude Code Patch Reviewer