From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm: renesas: rz-du: mipi_dsi: Add RZ_MIPI_DSI_FEATURE_GPO0R feature
Date: Sun, 12 Apr 2026 12:45:58 +1000 [thread overview]
Message-ID: <review-patch13-9e0f64dd5e1efb0d27219416121c91a19da96ebd.1775636898.git.tommaso.merciai.xr@bp.renesas.com> (raw)
In-Reply-To: <9e0f64dd5e1efb0d27219416121c91a19da96ebd.1775636898.git.tommaso.merciai.xr@bp.renesas.com>
Patch Review
This adds support for the RZ/G3E-specific GPO0R register for selecting the video input clock, and refactors `vclk` to an array to support two video clocks.
**Bug (indentation/scoping)**:
```c
dsi->vclk[0] = devm_clk_get(dsi->dev, "vclk");
if (IS_ERR(dsi->vclk[0]))
return PTR_ERR(dsi->vclk[0]);
```
The `if` and `return` are indented as if inside a block, but there is no enclosing block — they're at the wrong indentation level. The code will still compile and work correctly (C doesn't care about whitespace), but this is a clear coding style error. The `if` should be at the same level as the `devm_clk_get` call:
```c
dsi->vclk[0] = devm_clk_get(dsi->dev, "vclk");
if (IS_ERR(dsi->vclk[0]))
return PTR_ERR(dsi->vclk[0]);
```
**Issue (potential use of uninitialized variable)**: In `rzg2l_mipi_dsi_get_input_port()`:
```c
bool ep_enabled;
int in_port;
for_each_endpoint_of_node(np, ep_node) {
...
if (ep_enabled) {
in_port = ep.port;
break;
}
}
if (!ep_enabled)
return -EINVAL;
```
If the node has no endpoints at all (the `for_each_endpoint_of_node` loop body never executes), `ep_enabled` is used uninitialized. It should be initialized to `false`:
```c
bool ep_enabled = false;
```
Similarly, `in_port` could be used uninitialized in theory, though the `ep_enabled` check guards against that.
**Issue (OF node refcount)**: The `remote_ep` obtained from `of_graph_get_remote_endpoint()` is a device node that needs to be properly refcounted. The code does `of_node_put(remote_ep)` which is correct. However, `of_device_is_available()` checks the `status` property of a node — but `remote_ep` is an endpoint node, not a device node. Endpoint nodes don't typically have a `status` property. This should probably be checking the availability of the remote device node (the parent of the endpoint), not the endpoint itself. The function should use something like:
```c
remote_dev = of_graph_get_port_parent(remote_ep);
ep_enabled = of_device_is_available(remote_dev);
of_node_put(remote_dev);
of_node_put(remote_ep);
```
**Issue (missing `of_node_put` on early break)**: `for_each_endpoint_of_node` increments the refcount on `ep_node`. When breaking out of the loop early, the current `ep_node` reference should be released with `of_node_put(ep_node)`. The code breaks without putting the node.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-04-12 2:45 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-08 10:36 [PATCH v6 00/21] Add support for DU and DSI on the Renesas RZ/G3E SoC Tommaso Merciai
2026-04-08 10:36 ` [PATCH v6 01/21] clk: renesas: rzv2h: Add PLLDSI clk mux support Tommaso Merciai
2026-04-08 13:19 ` Geert Uytterhoeven
2026-04-12 2:45 ` Claude review: " Claude Code Review Bot
2026-04-08 10:36 ` [PATCH v6 02/21] clk: renesas: r9a09g047: Add CLK_PLLETH_LPCLK support Tommaso Merciai
2026-04-12 2:45 ` Claude review: " Claude Code Review Bot
2026-04-08 10:36 ` [PATCH v6 03/21] clk: renesas: r9a09g047: Add CLK_PLLDSI{0,1} clocks Tommaso Merciai
2026-04-12 2:45 ` Claude review: " Claude Code Review Bot
2026-04-08 10:36 ` [PATCH v6 04/21] clk: renesas: r9a09g047: Add CLK_PLLDSI{0, 1}_DIV7 clocks Tommaso Merciai
2026-04-12 2:45 ` Claude review: " Claude Code Review Bot
2026-04-08 10:36 ` [PATCH v6 05/21] clk: renesas: r9a09g047: Add CLK_PLLDSI{0, 1}_CSDIV clocks Tommaso Merciai
2026-04-12 2:45 ` Claude review: " Claude Code Review Bot
2026-04-08 10:36 ` [PATCH v6 06/21] clk: renesas: r9a09g047: Add support for SMUX2_DSI{0, 1}_CLK Tommaso Merciai
2026-04-08 13:23 ` Geert Uytterhoeven
2026-04-12 2:45 ` Claude review: " Claude Code Review Bot
2026-04-08 10:36 ` [PATCH v6 07/21] clk: renesas: r9a09g047: Add support for DSI clocks and resets Tommaso Merciai
2026-04-12 2:45 ` Claude review: " Claude Code Review Bot
2026-04-08 10:36 ` [PATCH v6 08/21] clk: renesas: r9a09g047: Add support for LCDC{0, 1} " Tommaso Merciai
2026-04-12 2:45 ` Claude review: " Claude Code Review Bot
2026-04-08 10:36 ` [PATCH v6 09/21] dt-bindings: display: renesas, rzg2l-du: Refuse port@1 for RZ/G2UL Tommaso Merciai
2026-04-08 12:21 ` [PATCH v6 09/21] dt-bindings: display: renesas,rzg2l-du: " Laurent Pinchart
2026-04-09 6:21 ` Krzysztof Kozlowski
2026-04-12 2:45 ` Claude review: dt-bindings: display: renesas, rzg2l-du: " Claude Code Review Bot
2026-04-08 10:36 ` [PATCH v6 10/21] dt-bindings: display: renesas, rzg2l-du: Add support for RZ/G3E SoC Tommaso Merciai
2026-04-08 12:24 ` [PATCH v6 10/21] dt-bindings: display: renesas,rzg2l-du: " Laurent Pinchart
2026-04-08 14:02 ` Tommaso Merciai
2026-04-08 14:16 ` Laurent Pinchart
2026-04-08 14:44 ` Tommaso Merciai
2026-04-08 15:00 ` Laurent Pinchart
2026-04-09 11:15 ` Tommaso Merciai
2026-04-09 13:24 ` Laurent Pinchart
2026-04-10 13:21 ` Tommaso Merciai
2026-04-12 2:45 ` Claude review: dt-bindings: display: renesas, rzg2l-du: " Claude Code Review Bot
2026-04-08 10:36 ` [PATCH v6 11/21] dt-bindings: display: bridge: renesas, dsi: " Tommaso Merciai
2026-04-12 2:45 ` Claude review: " Claude Code Review Bot
2026-04-08 10:36 ` [PATCH v6 12/21] drm: renesas: rz-du: mipi_dsi: Add out_port to OF data Tommaso Merciai
2026-04-08 12:30 ` Laurent Pinchart
2026-04-12 2:45 ` Claude review: " Claude Code Review Bot
2026-04-08 10:36 ` [PATCH v6 13/21] drm: renesas: rz-du: mipi_dsi: Add RZ_MIPI_DSI_FEATURE_GPO0R feature Tommaso Merciai
2026-04-08 12:31 ` Laurent Pinchart
2026-04-08 14:12 ` Tommaso Merciai
2026-04-08 14:17 ` Laurent Pinchart
2026-04-08 14:58 ` Tommaso Merciai
2026-04-08 15:08 ` Laurent Pinchart
2026-04-09 11:14 ` Tommaso Merciai
2026-04-09 13:22 ` Laurent Pinchart
2026-04-12 2:45 ` Claude Code Review Bot [this message]
2026-04-08 10:36 ` [PATCH v6 14/21] drm: renesas: rz-du: mipi_dsi: Add support for RZ/G3E Tommaso Merciai
2026-04-12 2:45 ` Claude review: " Claude Code Review Bot
2026-04-08 10:37 ` [PATCH v6 15/21] drm: renesas: rz-du: Add RZ/G3E support Tommaso Merciai
2026-04-12 2:45 ` Claude review: " Claude Code Review Bot
2026-04-08 10:37 ` [PATCH v6 16/21] media: dt-bindings: media: renesas, vsp1: Document RZ/G3E Tommaso Merciai
2026-04-08 10:52 ` [PATCH v6 16/21] media: dt-bindings: media: renesas,vsp1: " Laurent Pinchart
2026-04-12 2:45 ` Claude review: media: dt-bindings: media: renesas, vsp1: " Claude Code Review Bot
2026-04-08 10:37 ` [PATCH v6 17/21] media: dt-bindings: media: renesas, fcp: Document RZ/G3E SoC Tommaso Merciai
2026-04-08 10:53 ` [PATCH v6 17/21] media: dt-bindings: media: renesas,fcp: " Laurent Pinchart
2026-04-12 2:45 ` Claude review: media: dt-bindings: media: renesas, fcp: " Claude Code Review Bot
2026-04-08 10:37 ` [PATCH v6 18/21] arm64: dts: renesas: r9a09g047: Add fcpvd{0, 1} nodes Tommaso Merciai
2026-04-08 11:32 ` [PATCH v6 18/21] arm64: dts: renesas: r9a09g047: Add fcpvd{0,1} nodes Laurent Pinchart
2026-04-12 2:45 ` Claude review: arm64: dts: renesas: r9a09g047: Add fcpvd{0, 1} nodes Claude Code Review Bot
2026-04-08 10:37 ` [PATCH v6 19/21] arm64: dts: renesas: r9a09g047: Add vspd{0,1} nodes Tommaso Merciai
2026-04-08 11:33 ` Laurent Pinchart
2026-04-12 2:46 ` Claude review: " Claude Code Review Bot
2026-04-08 10:37 ` [PATCH v6 20/21] arm64: dts: renesas: r9a09g047: Add DU{0, 1} and DSI nodes Tommaso Merciai
2026-04-08 12:11 ` Laurent Pinchart
2026-04-12 2:46 ` Claude review: " Claude Code Review Bot
2026-04-08 10:37 ` [PATCH v6 21/21] arm64: dts: renesas: r9a09g047e57-smarc: Enable DU0 and DSI support Tommaso Merciai
2026-04-08 13:01 ` Geert Uytterhoeven
2026-04-12 2:46 ` Claude review: " Claude Code Review Bot
2026-04-12 2:45 ` Claude review: Add support for DU and DSI on the Renesas RZ/G3E SoC 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-patch13-9e0f64dd5e1efb0d27219416121c91a19da96ebd.1775636898.git.tommaso.merciai.xr@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