From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: accel/ivpu: Test for imported buffers with drm_gem_is_imported() Date: Tue, 10 Mar 2026 12:33:19 +1000 Message-ID: In-Reply-To: <20260309092755.3165130-1-karol.wachowski@linux.intel.com> References: <20260309092755.3165130-1-karol.wachowski@linux.intel.com> <20260309092755.3165130-1-karol.wachowski@linux.intel.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Correctness:** The two changes are semantically identical to the code the= y replace. `drm_gem_is_imported()` (defined at `include/drm/drm_gem.h:646`)= is simply `return !!obj->import_attach`, so: 1. `!bo->base.base.import_attach` =E2=86=92 `!drm_gem_is_imported(&bo->base= .base)` =E2=80=94 equivalent, since `!` on a pointer is the same as `!` on = `!!pointer`. 2. `bo->base.base.import_attach` =E2=86=92 `drm_gem_is_imported(&bo->base.b= ase)` =E2=80=94 equivalent truthiness test. **Consistency with existing codebase:** The ivpu driver already uses `drm_g= em_is_imported()` in three other places in the same file (`ivpu_gem.c:34`, = `ivpu_gem.c:317`, `ivpu_gem.c:552` on drm-next), so these two call sites we= re stragglers. This patch brings full consistency. **Minor note:** In the second hunk at `ivpu_bo_unbind_locked`, the very nex= t line still uses `bo->base.base.import_attach` directly: ```c if (drm_gem_is_imported(&bo->base.base)) { dma_buf_unmap_attachment(bo->base.base.import_attach, bo->base.sgt, DMA_BIDIRECTIONAL); ``` This is correct =E2=80=94 `dma_buf_unmap_attachment()` needs the actual `im= port_attach` pointer as a value, not a boolean test, so there's no accessor= to replace there. **Verdict:** Clean, correct, minimal patch. No concerns. --- Generated by Claude Code Patch Reviewer