From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot 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 Message-ID: In-Reply-To: <20260502031008.45873-1-hussain.bqadri@gmail.com> References: <20260502031008.45873-1-hussain.bqadri@gmail.com> <20260502031008.45873-1-hussain.bqadri@gmail.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 =3D mipi_dsi_generic_write(dsi, data, sizeof(data)); if (ret < 0) ctx->error =3D 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->a= ccum_err`, providing the same early-return-on-error and error-capture seman= tics. The removal of the `int error` field from `struct tc358762` is correct =E2= =80=94 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_er= ror()` 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, c= learing is unnecessary. The `struct mipi_dsi_device *dsi` lookup moved from `tc358762_write()` into= `tc358762_init()` where it's used to initialize `dsi_ctx` =E2=80=94 this i= s appropriate since the multi-context carries the device pointer. **Style:** The removal of the extra blank line before the final `return` (n= oted in the v2 changelog) is correct; the result matches typical kernel sty= le. **No issues found.**=20 Reviewed-by worthy as-is. --- Generated by Claude Code Patch Reviewer