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/mediatek: Convert legacy DRM logging to drm_* helpers in mtk_dsi.c
Date: Thu, 23 Apr 2026 10:21:29 +1000	[thread overview]
Message-ID: <review-overall-20260420052008.5417-1-abhiraj21put@gmail.com> (raw)
In-Reply-To: <20260420052008.5417-1-abhiraj21put@gmail.com>

Overall Series Review

Subject: drm/mediatek: Convert legacy DRM logging to drm_* helpers in mtk_dsi.c
Author: Abhishek Rajput <abhiraj21put@gmail.com>
Patches: 1
Reviewed: 2026-04-23T10:21:29.034621

---

This patch converts legacy `DRM_INFO()`/`DRM_WARN()`/`DRM_ERROR()` calls in `mtk_dsi.c` to the preferred `drm_info()`/`drm_warn()`/`drm_err()` helpers that take a `struct drm_device *`. The goal is correct and aligns with a longstanding DRM TODO item. However, the patch has two significant bugs and a commit message error.

**Critical issues:**
1. **NULL pointer dereference in `mtk_dsi_host_attach()`**: The patch reads `dsi->bridge.dev` at the top of the function, but at this point the bridge has not been attached to any DRM device yet. `bridge.dev` is only set later during `drm_bridge_attach()` (called indirectly via `component_add()` → `mtk_dsi_bind()` → `mtk_dsi_encoder_init()`). This will be NULL when the error path is hit, causing a crash.

2. **Declaration after statement in `mtk_dsi_switch_to_cmd_mode()`**: The variable declaration `struct drm_device *drm = dsi->bridge.dev;` is placed after two function call statements (`mtk_dsi_irq_data_clear`, `mtk_dsi_set_cmd_mode`). The kernel builds with `-Wdeclaration-after-statement` (and `-Werror` in many configs), so this will cause a build failure. All declarations must come before any statements in a block.

3. **Wrong subsystem in commit message**: The commit message says "This change aligns the radeon driver..." but the patch modifies the MediaTek DSI driver. This is a copy-paste error from a different patch.

---

---
Generated by Claude Code Patch Reviewer

      parent reply	other threads:[~2026-04-23  0:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-20  5:20 [PATCH] drm/mediatek: Convert legacy DRM logging to drm_* helpers in mtk_dsi.c Abhishek Rajput
2026-04-23  0:21 ` Claude review: " Claude Code Review Bot
2026-04-23  0:21 ` 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-overall-20260420052008.5417-1-abhiraj21put@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