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/bridge: chipone-icn6211: use devm_mipi_dsi_attach
Date: Mon, 25 May 2026 19:34:35 +1000	[thread overview]
Message-ID: <review-patch1-20260521212529.151493-1-osama.abdelkader@gmail.com> (raw)
In-Reply-To: <20260521212529.151493-1-osama.abdelkader@gmail.com>

Patch Review

**Change summary:** Converts `mipi_dsi_attach(dsi)` to `devm_mipi_dsi_attach(dev, dsi)` in `chipone_dsi_attach()`, then removes the now-empty `chipone_dsi_remove()` callback and its registration in the driver struct.

**Correctness:**

The `dev` parameter passed to `devm_mipi_dsi_attach`:

```c
static int chipone_dsi_attach(struct chipone *icn)
{
	struct mipi_dsi_device *dsi = icn->dsi;
	struct device *dev = icn->dev;
	...
	ret = devm_mipi_dsi_attach(dev, dsi);
```

This function is called from two probe paths:

1. **DSI probe** (`chipone_dsi_probe`): `icn->dev` = `&dsi->dev`, so the detach action is tied to the DSI device. Correct — matches the old `chipone_dsi_remove` behavior.

2. **I2C probe** (`chipone_i2c_probe` → `chipone_dsi_host_attach` → `chipone_dsi_attach`): `icn->dev` = `&client->dev` (the I2C device). The detach action is tied to the I2C device lifecycle. This is actually an **improvement** over the current tree — the I2C driver has no `.remove` callback, so `mipi_dsi_detach` was never called on I2C device removal. With this patch, managed cleanup handles it correctly.

**Removal of `chipone_dsi_remove`:** The patch is based on a tree where the prior `devm_drm_bridge_add()` conversion already removed `drm_bridge_remove()` from this callback, leaving only `mipi_dsi_detach(dsi)`. Since that's now handled by `devm_mipi_dsi_attach`, the entire callback becomes empty and can be safely removed. The current drm-next tree still has `drm_bridge_remove()` in `chipone_dsi_remove()` at line 771, which is why the patch doesn't apply cleanly — it depends on the prior conversion landing first.

**No issues found.** The patch is straightforward and correct.

Reviewed-by: Dave Airlie <airlied@gmail.com>

---
Generated by Claude Code Patch Reviewer

      parent reply	other threads:[~2026-05-25  9:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-21 21:25 [PATCH] drm/bridge: chipone-icn6211: use devm_mipi_dsi_attach Osama Abdelkader
2026-05-25  9:34 ` Claude review: " Claude Code Review Bot
2026-05-25  9:34 ` Claude Code Review Bot [this message]

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-20260521212529.151493-1-osama.abdelkader@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