From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm: renesas: rz-du: Make DU reset control optional for RZ/T2H support
Date: Tue, 05 May 2026 11:22:42 +1000 [thread overview]
Message-ID: <review-patch2-20260429170012.366537-3-prabhakar.mahadev-lad.rj@bp.renesas.com> (raw)
In-Reply-To: <20260429170012.366537-3-prabhakar.mahadev-lad.rj@bp.renesas.com>
Patch Review
The change itself is a single-line diff:
```c
- rcrtc->rstc = devm_reset_control_get_shared(rcdu->dev, NULL);
+ rcrtc->rstc = devm_reset_control_get_optional_shared(rcdu->dev, NULL);
```
**Issue 1 — NULL reset not guarded in callers:**
When the reset is optional, `devm_reset_control_get_optional_shared()` returns `NULL` if no reset is specified in DT. The error path immediately after:
```c
if (IS_ERR(rcrtc->rstc)) {
dev_err(rcdu->dev, "can't get cpg reset\n");
return PTR_ERR(rcrtc->rstc);
}
```
This correctly handles the `IS_ERR` case, and `NULL` will pass through (not an error). However, we need to verify that all callers of `rcrtc->rstc` handle `NULL` safely. The reset control API (`reset_control_deassert`, `reset_control_assert`) does handle `NULL` arguments gracefully (they're no-ops), so this should be safe. This is fine.
**Issue 2 — Ordering concern:**
This patch makes the reset optional unconditionally for all SoCs, but the DT binding in patch 1 uses `resets: false` to forbid it only on T2H. The driver change is broader than the binding constraint, which is acceptable since the optional API is safe for all variants. But the commit message should clarify that the reset API itself is NULL-safe, so existing SoCs with resets continue to work unchanged.
**Minor — Error message is now misleading:**
The error log `"can't get cpg reset\n"` still triggers on failure, but since the reset is optional, the error path only fires for actual errors (not absence). This is fine, but the message could note it's a lookup error vs. absence.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-05 1:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 17:00 [PATCH 0/4] Add DU support for RZ/T2H and RZ/N2H SoCs Prabhakar
2026-04-29 17:00 ` [PATCH 1/4] dt-bindings: display: renesas, rzg2l-du: Add RZ/T2H and RZ/N2H support Prabhakar
2026-05-05 1:22 ` Claude review: " Claude Code Review Bot
2026-04-29 17:00 ` [PATCH 2/4] drm: renesas: rz-du: Make DU reset control optional for RZ/T2H support Prabhakar
2026-05-05 1:22 ` Claude Code Review Bot [this message]
2026-04-29 17:00 ` [PATCH 3/4] drm: renesas: rz-du: Move mode_valid logic to per-SoC clock limits Prabhakar
2026-05-05 1:22 ` Claude review: " Claude Code Review Bot
2026-04-29 17:00 ` [PATCH 4/4] drm: renesas: rz-du: Add support for RZ/T2H SoC Prabhakar
2026-04-30 7:48 ` Geert Uytterhoeven
2026-04-30 8:28 ` Lad, Prabhakar
2026-05-05 1:22 ` Claude review: " Claude Code Review Bot
2026-05-05 1:22 ` Claude review: Add DU support for RZ/T2H and RZ/N2H SoCs 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-patch2-20260429170012.366537-3-prabhakar.mahadev-lad.rj@bp.renesas.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