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/panel: tdo-tl070wsh30: Use devm_drm_panel_add() Date: Tue, 05 May 2026 10:22:00 +1000 Message-ID: In-Reply-To: <20260430141746.4214-1-pakmyeonghun@bagmyeonghun-ui-MacBookPro.local> References: <20260430141746.4214-1-pakmyeonghun@bagmyeonghun-ui-MacBookPro.local> <20260430141746.4214-1-pakmyeonghun@bagmyeonghun-ui-MacBookPro.local> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Build failure =E2=80=94 function does not exist** The core change: ```c - drm_panel_add(&tdo_tl070wsh30->base); - - return 0; + return devm_drm_panel_add(dev, &tdo_tl070wsh30->base); ``` `devm_drm_panel_add()` is not declared in `include/drm/drm_panel.h` and is = not defined anywhere in `drivers/gpu/drm/drm_panel.c` or elsewhere. This wi= ll fail at compile time with an implicit function declaration error. The ex= isting API provides: - `drm_panel_add(struct drm_panel *)` =E2=80=94 void, non-managed - `drm_panel_remove(struct drm_panel *)` =E2=80=94 the matching cleanup - `__devm_drm_panel_alloc()` =E2=80=94 managed *allocation*, not registrati= on The correct approach to achieve managed panel registration would be one of: 1. Use `devm_add_action_or_reset()` to register a callback that calls `drm_= panel_remove()` on cleanup, creating an ad-hoc devm wrapper. 2. Propose a new `devm_drm_panel_add()` helper in drm_panel.c/drm_panel.h a= s a preparatory patch, then use it here. **Remove-side cleanup is correct but moot** The removal of `drm_panel_remove()` from `tdo_tl070wsh30_panel_remove()` an= d the now-unused local variable is the right cleanup *if* the devm registra= tion existed, but without it this just creates a leak where the panel is ne= ver unregistered. **Fixes tag correctness**: The identified bug (panel remains registered if = `mipi_dsi_attach()` fails) is real and the Fixes tag `cf40c6600592` appears= correct, but the fix itself is broken. --- Generated by Claude Code Patch Reviewer