From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: treewide: Manually convert custom kernel_param_ops .get callbacks Date: Mon, 25 May 2026 20:11:18 +1000 Message-ID: In-Reply-To: <20260521133326.2465264-10-kees@kernel.org> References: <20260521133315.work.845-kees@kernel.org> <20260521133326.2465264-10-kees@kernel.org> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review These are the callbacks the Coccinelle script couldn't handle =E2=80=94 one= s that do multi-step string construction, pass the buffer through helper fu= nctions, or use `strcpy`/`memcpy`. **`drivers/gpu/drm/i915/i915_mitigations.c`**: The conversion is well done.= The trailing-comma-to-newline replacement now guards against overflow: ```c + if (!seq_buf_has_overflowed(buffer) && buffer->len > 0 && + buffer->buffer[buffer->len - 1] =3D=3D ',') + buffer->buffer[buffer->len - 1] =3D '\n'; ``` This is an improvement over the old code which unconditionally wrote `buffe= r[count - 1] =3D '\n'`. **`drivers/char/ipmi/ipmi_watchdog.c`**: The `get_param_str` rework is nota= ble =E2=80=94 the old code called `fn(NULL, buffer)`, checked for errors, t= hen appended a newline. The new code just calls `fn(NULL, buffer)` and retu= rns its result. The newline is now appended inside `action_op`/`preaction_o= p`/`preop_op` themselves via `seq_buf_printf(outval, "%s\n", ...)`. This is= correct =E2=80=94 the newline responsibility is pushed into the individual= ops. **`drivers/acpi/sysfs.c`**: The multi-line debug layer/level output is nice= ly simplified =E2=80=94 no more manual offset tracking. **`drivers/scsi/fcoe/fcoe_transport.c`**: Small behavioral improvement =E2= =80=94 the old code used `IFNAMSIZ` as the buffer limit per transport name = which was arbitrary; the new code relies on seq_buf's natural bounds. The e= mpty-list "none" case was restructured to use an explicit `list_empty()` ch= eck instead of checking whether anything was written. Correct. **`lib/dynamic_debug.c`**: Note that `param_get_dyndbg_classes()` still ret= urns `-1` in the default case rather than a proper `-errno`. This is pre-ex= isting and not introduced by this patch, but it's worth noting. **Verdict: Well-done manual conversions. No correctness issues.** --- Generated by Claude Code Patch Reviewer