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: anbernic-td4310: Add RG Vita Pro panel Date: Tue, 28 Apr 2026 14:19:03 +1000 Message-ID: In-Reply-To: <20260427170914.5062-5-macroalpha82@gmail.com> References: <20260427170914.5062-1-macroalpha82@gmail.com> <20260427170914.5062-5-macroalpha82@gmail.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 This is the most relevant patch for dri-devel. The driver is clean and uses= modern APIs well. **Unused fields in `anbernic_panel_td4310_info`:** The struct defines `prepare_delay`, `init_delay`, `disable_delay`, and `unp= repare_delay`, and they are assigned values in `anbernic_vitapro_info`, but= none of these fields are actually used in the prepare/unprepare functions.= Only `reset_delay` and `enable_delay` are used. The unused fields should b= e removed. ```c u16 prepare_delay; u16 reset_delay; u16 init_delay; /* unused */ u16 enable_delay; u16 disable_delay; /* unused */ u16 unprepare_delay; /* unused */ ``` **Trailing semicolon after if block:** ```c if (ctx->enable_gpio) { ret =3D gpiod_set_value_cansleep(ctx->enable_gpio, 1); if (ret) goto err_enable; }; ``` The `};` should just be `}`. **Inconsistent error handling in `panel_anbernic_td4310_unprepare`:** The function ignores return values from `gpiod_set_value_cansleep` and `reg= ulator_disable`, always returning 0. This is generally fine for unprepare p= aths, but is inconsistent with the prepare path's careful error handling. T= he `mipi_dsi_multi_context` `accum_err` is also not checked/returned. **`drm_panel_add` before `mipi_dsi_attach` with manual cleanup:** The probe function adds the panel then attaches DSI, with manual cleanup on= failure: ```c drm_panel_add(&ctx->panel); ret =3D mipi_dsi_attach(dsi); if (ret < 0) { dev_err(dev, "mipi_dsi_attach failed: %d\n", ret); drm_panel_remove(&ctx->panel); return ret; } ``` This is correct but could use `dev_err_probe` for consistency with the rest= of the probe function. **The `remove` function should use `mipi_dsi_detach` before `drm_panel_remo= ve` =E2=80=94 this ordering is correct.** Good. --- Generated by Claude Code Patch Reviewer