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/panfrost: Add bus_ace optional clock support for RZ/G2L
Date: Thu, 05 Mar 2026 13:22:27 +1000	[thread overview]
Message-ID: <review-patch3-20260304134845.267030-4-biju.das.jz@bp.renesas.com> (raw)
In-Reply-To: <20260304134845.267030-4-biju.das.jz@bp.renesas.com>

Patch Review

This patch adds a `bus_ace_clock` optional clock, wiring it into init, fini, and runtime suspend/resume.

**Bug: Duplicate `err = PTR_ERR(...)` assignment.** In `panfrost_clk_init()`:

```c
+	if (IS_ERR(pfdev->bus_ace_clock)) {
+		err = PTR_ERR(pfdev->bus_ace_clock);
+		dev_err(pfdev->base.dev, "get bus_ace_clock failed %ld\n",
+			PTR_ERR(pfdev->bus_ace_clock));
+		err = PTR_ERR(pfdev->bus_ace_clock);
+		goto disable_bus_clock;
+	}
```

The `err = PTR_ERR(pfdev->bus_ace_clock)` is assigned twice (lines before and after the `dev_err`). This is harmless but clearly a copy-paste error. The first assignment should be removed (keeping it after `dev_err` for consistency with the existing `bus_clock` error block pattern), or the second one removed.

**Inconsistency with bus_clock init pattern.** The existing `bus_clock` init code has a `if (pfdev->bus_clock)` guard around `clk_prepare_enable()` (line 64-71 in the applied code), which also prints the clock rate. The new `bus_ace_clock` code calls `clk_prepare_enable()` unconditionally (which is fine since the clk API handles NULL), but this creates an inconsistency within the same function. Consider either: (a) also removing the NULL guard from the `bus_clock` block for consistency, or (b) matching the existing pattern. This is minor since the API handles NULL, but consistency aids readability.

**Runtime resume error path nesting.** The `clk_enable(pfdev->bus_ace_clock)` call and its error label `err_bus_ace_clk` are placed *inside* the `if (pfdev->comp->pm_features & BIT(GPU_PM_RT))` block, but the error label itself is *outside* the block:

```c
	if (pfdev->comp->pm_features & BIT(GPU_PM_RT)) {
		...
		ret = clk_enable(pfdev->bus_ace_clock);
		if (ret)
			goto err_bus_ace_clk;
	}
	...
	return 0;

err_bus_ace_clk:
	if (pfdev->comp->pm_features & BIT(GPU_PM_RT))
		clk_disable(pfdev->bus_clock);
```

This works because the goto only fires when `GPU_PM_RT` is set, and the error handlers re-check the flag. This matches the existing pattern for `err_bus_clk` and `err_clk`, so it's fine.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-03-05  3:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-04 13:48 [PATCH 0/4] Add RZ/G3L GFX support Biju
2026-03-04 13:48 ` [PATCH 1/4] dt-bindings: gpu: mali-bifrost: Add compatible for RZ/G3L SoC Biju
2026-03-05  3:22   ` Claude review: " Claude Code Review Bot
2026-03-04 13:48 ` [PATCH 2/4] drm/panfrost: Drop redundant optional clock checks in runtime PM Biju
2026-03-05  3:22   ` Claude review: " Claude Code Review Bot
2026-03-04 13:48 ` [PATCH 3/4] drm/panfrost: Add bus_ace optional clock support for RZ/G2L Biju
2026-03-05  3:22   ` Claude Code Review Bot [this message]
2026-03-04 13:48 ` [PATCH 4/4] drm/panfrost: Add GPU_PM_RT support for RZ/G3L SoC Biju
2026-03-05  3:22   ` Claude review: " Claude Code Review Bot
2026-03-05  3:22 ` Claude review: Add RZ/G3L GFX support Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-03-20 16:41 [PATCH v2 0/4] " Biju
2026-03-20 16:41 ` [PATCH v2 3/4] drm/panfrost: Add bus_ace optional clock support for RZ/G2L Biju
2026-03-21 17:29   ` 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-patch3-20260304134845.267030-4-biju.das.jz@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