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: rz-du: Ensure correct suspend/resume ordering with VSP
Date: Tue, 31 Mar 2026 17:10:17 +1000	[thread overview]
Message-ID: <review-patch1-20260330144651.817338-1-tommaso.merciai.xr@bp.renesas.com> (raw)
In-Reply-To: <20260330144651.817338-1-tommaso.merciai.xr@bp.renesas.com>

Patch Review

**Commit message:** Clear and well-written. Explains *why* the device link is needed (suspend/resume ordering), credits the original R-Car DU work, and includes the reference commit hash.

**Header changes (`rzg2l_du_vsp.h`):**
- Forward declaration of `struct device_link` added in correct alphabetical position.
- New `struct device_link *link` member added to `struct rzg2l_du_vsp` — correct placement alongside the existing `struct device *vsp`.

**Init path (`rzg2l_du_vsp_init`):**
```c
vsp->link = device_link_add(rcdu->dev, vsp->vsp, DL_FLAG_STATELESS);
```
- `rcdu->dev` (DU) is correctly the consumer, `vsp->vsp` is correctly the supplier.
- `DL_FLAG_STATELESS` is the right flag — it enforces suspend/resume ordering without managing the device lifecycle. This matches the R-Car DU driver.
- Error path returns `-EINVAL` with a dev_err message — appropriate.
- Placement after `drmm_add_action_or_reset()` and before `vsp1_du_init()` is correct: the cleanup action is already registered, so if `device_link_add` or `vsp1_du_init` fails, `rzg2l_du_vsp_cleanup` will be called and will properly delete the link (or skip if NULL).

**Cleanup path (`rzg2l_du_vsp_cleanup`):**
```c
if (vsp->link)
    device_link_del(vsp->link);
```
- The NULL check is correct for the case where `device_link_add` failed (since cleanup is registered before the link is created).
- `device_link_del` before `put_device` is the right ordering.

**Include addition:** `<linux/device.h>` added in alphabetical order — correct.

**No issues.** The patch is a clean, minimal, well-motivated change that mirrors proven code from the R-Car DU driver.

---
Generated by Claude Code Patch Reviewer

  parent reply	other threads:[~2026-03-31  7:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-30 14:46 [PATCH v2] drm: rz-du: Ensure correct suspend/resume ordering with VSP Tommaso Merciai
2026-03-31  7:10 ` Claude review: " Claude Code Review Bot
2026-03-31  7:10 ` Claude Code Review Bot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-03-24 18:05 [PATCH] " Tommaso Merciai
2026-03-24 20:34 ` Claude review: " Claude Code Review Bot
2026-03-24 20:34 ` 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-patch1-20260330144651.817338-1-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