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/amdgpu: remove dead empty checks in ring_mux ib_mark_offset and end_ib Date: Mon, 25 May 2026 20:07:45 +1000 Message-ID: In-Reply-To: <20260521133537.3438468-1-maoyixie.tju@gmail.com> References: <20260521133537.3438468-1-maoyixie.tju@gmail.com> <20260521133537.3438468-1-maoyixie.tju@gmail.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: Good.** The two removed blocks are identical in structure: ```c chunk =3D list_last_entry(&e->list, struct amdgpu_mux_chunk, entry); - if (!chunk) { - DRM_ERROR("cannot find chunk!\n"); - return; - } ``` `list_last_entry` expands to `container_of((ptr)->prev, type, member)` (`in= clude/linux/list.h:630`), which performs pointer arithmetic and can never y= ield NULL. The check was always false =E2=80=94 removing it is correct. **Precondition argument: Sound.** The commit message claims `e->list` is gu= aranteed non-empty at both call sites. Looking at the post-patch code at `a= mdgpu_ring_mux.c:497` and `:526`, both functions first look up the mux entr= y via `amdgpu_ring_mux_sw_entry()` and bail on failure. The `list_last_entr= y` call only executes after that guard, on a ring that has gone through `st= art_ib` which links a chunk. This is a valid invariant. **No functional change:** The removal only deletes unreachable code paths. = The `list_last_entry()` call and all subsequent logic are unchanged. **No issues found.** Clean, minimal patch with an accurate commit message. = No concerns. --- Generated by Claude Code Patch Reviewer