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 12:29:53 +1000 Message-ID: In-Reply-To: <20260602172807.1051806-2-lyude@redhat.com> References: <20260602172807.1051806-1-lyude@redhat.com> <20260602172807.1051806-2-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 A simple RAII guard for the DMA reservation lock. Clean and correct. 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`, `dma_resv_lock` degenerates to `mutex_lock` and always returns 0, so ignoring the return value is safe in practice. The TODO comment acknowledging this should be replaced with proper WwMutex bindings is appropriate. The `#[expect(unused)]` on `new()` is fine since patch 2 removes it immediately. The `#[inline(always)]` on both `new()` and `drop()` is reasonable for a thin lock wrapper. No issues. --- Generated by Claude Code Patch Reviewer