From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/i915/gem: Drop check for changed VM in EXECBUF Date: Sun, 12 Apr 2026 11:46:34 +1000 Message-ID: In-Reply-To: <20260409053111.8914-1-joonas.lahtinen@linux.intel.com> References: <20260409053111.8914-1-joonas.lahtinen@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 Overall Series Review Subject: drm/i915/gem: Drop check for changed VM in EXECBUF Author: Joonas Lahtinen Patches: 2 Reviewed: 2026-04-12T11:46:34.835044 --- This is a single, well-motivated cleanup patch that removes a dead VM-equal= ity check in the execbuffer VMA lookup path. The commit message and Sima's = included analysis clearly trace the history: the check was originally neede= d when `gem_ctx->vm` could change at runtime (introduced in e0695db7298e), = but since the proto-context rework (d4433c7600f7), `ctx->vm` is set once at= context creation and never modified afterward. The VMA entries in `handles= _vma` are always created via `i915_vma_instance(obj, vm, NULL)` using the s= ame `vm`, so the `vma->vm =3D=3D vm` check is indeed tautologically true. The change is correct and trivially safe. It removes one comparison per cac= hed VMA lookup on the fast path of execbuffer, which is a minor but nice cl= eanup. One observation: the v3 changelog mentions adding a `WARN_ON_ONCE`, but the= v4 patch does not include one. The v4 changelog says "Focus only on latest= mainline codebase," suggesting the WARN was intentionally dropped. This is= worth noting =E2=80=94 a `WARN_ON_ONCE(vma && vma->vm !=3D vm)` would have= provided runtime validation of the invariant while keeping the fast path e= ssentially the same. However, if the maintainers are confident the invarian= t is well-established (and it has been since 2022), omitting the WARN to ke= ep the code clean is a reasonable choice. **Verdict:** The patch looks correct and ready to merge. --- Generated by Claude Code Patch Reviewer