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/mediatek: Convert legacy DRM logging to drm_* helpers in mtk_dsi.c Date: Thu, 23 Apr 2026 10:21:29 +1000 Message-ID: In-Reply-To: <20260420052008.5417-1-abhiraj21put@gmail.com> References: <20260420052008.5417-1-abhiraj21put@gmail.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Overall Series Review Subject: drm/mediatek: Convert legacy DRM logging to drm_* helpers in mtk_d= si.c Author: Abhishek Rajput 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 l= ongstanding 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 late= r during `drm_bridge_attach()` (called indirectly via `component_add()` =E2= =86=92 `mtk_dsi_bind()` =E2=86=92 `mtk_dsi_encoder_init()`). This will be N= ULL when the error path is hit, causing a crash. 2. **Declaration after statement in `mtk_dsi_switch_to_cmd_mode()`**: The v= ariable declaration `struct drm_device *drm =3D 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 declarati= ons must come before any statements in a block. 3. **Wrong subsystem in commit message**: The commit message says "This cha= nge aligns the radeon driver..." but the patch modifies the MediaTek DSI dr= iver. This is a copy-paste error from a different patch. --- --- Generated by Claude Code Patch Reviewer