From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/bridge: tc358762: Use mipi_dsi_generic_write_multi()
Date: Sun, 12 Apr 2026 09:13:55 +1000 [thread overview]
Message-ID: <review-patch1-20260411010648.39585-1-hussain.bqadri@gmail.com> (raw)
In-Reply-To: <20260411010648.39585-1-hussain.bqadri@gmail.com>
Patch Review
**Correctness: Good.** The conversion is functionally equivalent to the original code:
1. The `int error` field is removed from `struct tc358762`, and `tc358762_clear_error()` is deleted. These are replaced by `struct mipi_dsi_multi_context dsi_ctx` declared locally in `tc358762_init()`, which provides the same `accum_err` accumulation semantics via the kernel API.
2. `tc358762_write()` signature changes from `(struct tc358762 *ctx, ...)` to `(struct mipi_dsi_multi_context *dsi_ctx, ...)`. The old early-return-on-error check and manual error store:
```c
if (ctx->error)
return;
...
ret = mipi_dsi_generic_write(dsi, data, sizeof(data));
if (ret < 0)
ctx->error = ret;
```
are both handled internally by `mipi_dsi_generic_write_multi()`, which checks `ctx->accum_err` before writing and stores any error automatically.
3. The final `return tc358762_clear_error(ctx)` is replaced by `return dsi_ctx.accum_err`, which is the correct way to retrieve the accumulated error from the multi-context.
4. All call sites in `tc358762_init()` are updated consistently from `tc358762_write(ctx, ...)` to `tc358762_write(&dsi_ctx, ...)`.
**Minor nit:** There is a leftover extra blank line in `tc358762_write()`:
```c
static void tc358762_write(struct mipi_dsi_multi_context *dsi_ctx, u16 addr, u32 val)
{
u8 data[6];
data[0] = addr;
```
There are two blank lines between the variable declaration and the first assignment. This is cosmetic-only, but one blank line would be more consistent with kernel style.
**Missing CC:** The `MAINTAINERS` file for `DRM BRIDGE ACTIVE COMPONENTS` likely lists maintainers who should be CC'd. The patch is CC'd to Andrzej Hajda, Neil Armstrong, and Robert Foss, which appear to be the bridge subsystem maintainers, so this is probably fine.
**Overall:** This is a clean, well-motivated cleanup. The commit message is clear about what it does. The patch is small, correct, and follows the established pattern used by other drivers.
---
Generated by Claude Code Patch Reviewer
prev parent reply other threads:[~2026-04-11 23:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-11 1:06 [PATCH] drm/bridge: tc358762: Use mipi_dsi_generic_write_multi() Hussain Qadri
2026-04-11 23:13 ` Claude review: " Claude Code Review Bot
2026-04-11 23:13 ` 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-20260411010648.39585-1-hussain.bqadri@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