public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
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	[thread overview]
Message-ID: <review-patch4-20260427170914.5062-5-macroalpha82@gmail.com> (raw)
In-Reply-To: <20260427170914.5062-5-macroalpha82@gmail.com>

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 `unprepare_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 be 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 = 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 `regulator_disable`, always returning 0. This is generally fine for unprepare paths, but is inconsistent with the prepare path's careful error handling. The `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 = 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_remove` — this ordering is correct.** Good.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-04-28  4:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-27 17:09 [PATCH 0/6] Add Anbernic RG Vita-Pro Chris Morgan
2026-04-27 17:09 ` [PATCH 1/6] dt-bindings: power: supply: sgm41542: document sgm41542 Chris Morgan
2026-04-28  4:19   ` Claude review: " Claude Code Review Bot
2026-04-27 17:09 ` [PATCH 2/6] power: supply: sgm41542: Add SG Micro sgm41542 charger Chris Morgan
2026-04-28  4:19   ` Claude review: " Claude Code Review Bot
2026-04-27 17:09 ` [PATCH 3/6] dt-bindings: display: panel: document Anbernic TD4310 panel Chris Morgan
2026-04-28  4:19   ` Claude review: " Claude Code Review Bot
2026-04-27 17:09 ` [PATCH 4/6] drm/panel: anbernic-td4310: Add RG Vita Pro panel Chris Morgan
2026-04-28  4:19   ` Claude Code Review Bot [this message]
2026-04-27 17:09 ` [PATCH 5/6] dt-bindings: arm: rockchip: Add Anbernic RG Vita-Pro Chris Morgan
2026-04-28  4:19   ` Claude review: " Claude Code Review Bot
2026-04-27 17:09 ` [PATCH 6/6] arm64: dts: " Chris Morgan
2026-04-27 17:13   ` Chris Morgan
2026-04-28  4:19   ` Claude review: " Claude Code Review Bot
2026-04-28  4:19 ` Claude review: " Claude Code Review Bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=review-patch4-20260427170914.5062-5-macroalpha82@gmail.com \
    --to=claude-review@example.com \
    --cc=dri-devel-reviews@example.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox