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: Open-code drm_simple_encoder_init() in several drivers Date: Thu, 04 Jun 2026 15:05:00 +1000 Message-ID: In-Reply-To: <20260531073532.8609-1-namanarora029@gmail.com> References: <20260531073532.8609-1-namanarora029@gmail.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: Open-code drm_simple_encoder_init() in several drivers Author: Naman Arora Patches: 7 Reviewed: 2026-06-04T15:05:00.305353 --- This is a straightforward, well-structured cleanup series that open-codes `= drm_simple_encoder_init()` across six call sites in four drivers. The state= d goal is to remove the dependency on `drm_simple_kms_helper` from drivers = that only use it for this single trivial wrapper. Each patch is mechanically identical: define a static `const struct drm_enc= oder_funcs` with `.destroy =3D drm_encoder_cleanup`, replace the `drm_simpl= e_encoder_init()` call with `drm_encoder_init()`, and remove the `drm_simpl= e_kms_helper.h` include. I verified the original implementation in `drm_simple_kms_helper.c:18-29` = =E2=80=94 it is exactly a wrapper around `drm_encoder_init()` with a `{ .de= stroy =3D drm_encoder_cleanup }` funcs struct. All six patches replicate th= is correctly. **Concerns:** 1. **Missing motivation for the larger goal.** The cover letter explains *w= hat* but not *why* removing `drm_simple_kms_helper` dependency matters. Is = this a precursor to removing `drm_simple_encoder_init()` entirely? Or chang= ing the helper module? The series would benefit from stating the end goal. = The `Documentation/gpu/todo.rst` file in the tree lists this cleanup, so it= 's a known TODO item, but the cover letter should reference that. 2. **Code duplication vs. consolidation.** This series creates six identica= l `{ .destroy =3D drm_encoder_cleanup }` structs across six files. An alter= native approach would be to move `drm_simple_encoder_init()` into a more li= ghtweight header/module, or just keep using it. However, the todo.rst likel= y endorses this approach, and the resulting code is trivial enough that dup= lication is acceptable. 3. **Incomplete series** =E2=80=94 these are only 6 of the ~40+ callers of = `drm_simple_encoder_init()` in the tree. That's fine as incremental progres= s, but the cover letter could mention this. 4. **Meson patches 4-6 sent as a sub-thread** =E2=80=94 patches 4/6, 5/6, a= nd 6/6 have a different Message-Id series (`20260531074627.8936-*`) vs the = main series (`20260531073532.8609-*`). This is a minor submission issue whe= re they were sent as a separate `git send-email` run with different In-Repl= y-To threading. Not a code issue but can confuse tooling. Overall: **Low risk, correct transformation.** Series is suitable for mergi= ng with minor nits. --- Generated by Claude Code Patch Reviewer