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: Document why full JSM message size is always used Date: Mon, 25 May 2026 19:04:12 +1000 Message-ID: In-Reply-To: <20260522093209.1169716-1-karol.wachowski@linux.intel.com> References: <20260522093209.1169716-1-karol.wachowski@linux.intel.com> <20260522093209.1169716-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 **Assessment: No issues found.** The existing code at `ivpu_ipc.c:100` has this TODO: ```c /* TODO: Set data_size to actual JSM message size, not union of all message= s */ ``` This implies `sizeof(*req)` (where `req` is `struct vpu_jsm_msg *`) is a bu= g or technical debt to be fixed. The patch replaces it with: ```c /* * Firmware expects full JSM message size regardless of the payload size. * Unused fields must be zeroed to allow future extensions of existing * commands without breaking compatibility. */ ``` The replacement comment is accurate and well-justified: 1. **Zeroing is handled**: `memset(tx_buf, 0, sizeof(*tx_buf))` at line 98 = zeroes the entire buffer including the JSM portion, which supports the "unu= sed fields must be zeroed" claim. 2. **`vpu_jsm_msg` is indeed a union-based struct**: Looking at the callers= in `ivpu_jsm_msg.c`, every message is declared as `struct vpu_jsm_msg req = =3D { .type =3D ... }` and only populates the relevant payload union member= , confirming that the full struct size is always sent regardless of which c= ommand is used. 3. **The comment follows kernel multi-line comment style** (`/* ... */` blo= ck) correctly. **Minor observation**: The commit message is well-written and self-containe= d =E2=80=94 it explains both the firmware requirement and the forward-compa= tibility rationale without being verbose. No concerns with this patch. It can be applied as-is. --- Generated by Claude Code Patch Reviewer