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/atomic: Remove state argument to drm_atomic_private_obj_init Date: Fri, 27 Feb 2026 15:05:37 +1000 Message-ID: In-Reply-To: <20260224-drm-private-obj-reset-v5-4-5a72f8ec9934@kernel.org> References: <20260224-drm-private-obj-reset-v5-0-5a72f8ec9934@kernel.org> <20260224-drm-private-obj-reset-v5-4-5a72f8ec9934@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 **Commit message**: Clear. Has multiple Reviewed-by tags (Dmitry Baryshkov,= Tomi Valkeinen, Liviu Dudau, Ma=C3=ADra Canal), which is good. **Code review**: The core change in `drm_atomic.c` is clean and correct: ```c int drm_atomic_private_obj_init(struct drm_device *dev, struct drm_private_obj *obj, const struct drm_private_state_funcs *funcs) { struct drm_private_state *state; memset(obj, 0, sizeof(*obj)); drm_modeset_lock_init(&obj->lock); obj->dev =3D dev; obj->funcs =3D funcs; list_add_tail(&obj->head, &dev->mode_config.privobj_list); state =3D obj->funcs->atomic_create_state(obj); if (IS_ERR(state)) return PTR_ERR(state); obj->state =3D state; return 0; } ``` The removal of the fallback path and state parameter is the logical conclus= ion of the conversion. The function is now simpler and has a single code pa= th. **Nit**: When the function returns an error from `atomic_create_state`, the= object has already been added to `dev->mode_config.privobj_list` with `obj= ->state =3D NULL` (from memset). This could be problematic if anything iter= ates the list before the caller has a chance to clean up. Consider moving t= he `list_add_tail` after the successful state creation, or removing from th= e list on error. This is a pre-existing issue from the earlier NULL-handlin= g code, but now is a good time to fix it. All driver-side changes in this patch are purely mechanical removal of the = `NULL` argument from every `drm_atomic_private_obj_init()` call =E2=80=94 t= hese are all correct. The header change removing the parameter from the declaration is correct: ```c int drm_atomic_private_obj_init(struct drm_device *dev, struct drm_private_obj *obj, - struct drm_private_state *state, const struct drm_private_state_funcs *funcs); ``` **No issues with this patch itself.** --- ### Cover Letter Note The v3 changelog was not filled in: ``` Changes in v3: - EDITME: describe what is new in this series revision. - EDITME: use bulletpoints and terse descriptions. ``` This is a minor cosmetic issue but looks unprofessional in the archives. Sh= ould be fixed if a v6 is needed. --- Generated by Claude Code Patch Reviewer