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: Tue, 05 May 2026 08:59:34 +1000 [thread overview]
Message-ID: <review-patch1-20260502031008.45873-1-hussain.bqadri@gmail.com> (raw)
In-Reply-To: <20260502031008.45873-1-hussain.bqadri@gmail.com>
Patch Review
**Correctness:**
The conversion is correct. The old pattern:
```c
static void tc358762_write(struct tc358762 *ctx, u16 addr, u32 val)
{
...
if (ctx->error)
return;
...
ret = mipi_dsi_generic_write(dsi, data, sizeof(data));
if (ret < 0)
ctx->error = ret;
}
```
is functionally equivalent to the new pattern:
```c
static void tc358762_write(struct mipi_dsi_multi_context *dsi_ctx, u16 addr, u32 val)
{
...
mipi_dsi_generic_write_multi(dsi_ctx, data, sizeof(data));
}
```
because `mipi_dsi_generic_write_multi()` internally checks and sets `ctx->accum_err`, providing the same early-return-on-error and error-capture semantics.
The removal of the `int error` field from `struct tc358762` is correct — no other code references it outside the removed functions.
The return value change from `tc358762_clear_error(ctx)` to `dsi_ctx.accum_err` at the end of `tc358762_init()` is correct. The old `tc358762_clear_error()` returned the accumulated error and reset it to zero; since `dsi_ctx` is a local variable that goes out of scope immediately after the return, clearing is unnecessary.
The `struct mipi_dsi_device *dsi` lookup moved from `tc358762_write()` into `tc358762_init()` where it's used to initialize `dsi_ctx` — this is appropriate since the multi-context carries the device pointer.
**Style:** The removal of the extra blank line before the final `return` (noted in the v2 changelog) is correct; the result matches typical kernel style.
**No issues found.**
Reviewed-by worthy as-is.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-04 22:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-02 3:10 [PATCH v2] drm/bridge: tc358762: Use mipi_dsi_generic_write_multi() Hussain Qadri
2026-05-04 22:59 ` Claude review: " Claude Code Review Bot
2026-05-04 22:59 ` Claude Code Review Bot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-04-11 1:06 [PATCH] " Hussain Qadri
2026-04-11 23:13 ` Claude review: " Claude Code Review Bot
2026-04-11 23:13 ` 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-20260502031008.45873-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