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/msm/adreno: Fix invalid drvdata typecast in adreno_remove() Date: Sat, 16 May 2026 12:47:08 +1000 Message-ID: In-Reply-To: <20260513-gmu-sync-state-fix-v1-3-6e33e6aa9b4f@oss.qualcomm.com> References: <20260513-gmu-sync-state-fix-v1-0-6e33e6aa9b4f@oss.qualcomm.com> <20260513-gmu-sync-state-fix-v1-3-6e33e6aa9b4f@oss.qualcomm.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review **Verdict: Good bugfix.** The old code interpreted the GPU pdev's drvdata as `struct msm_drm_private *`: ```c - struct msm_drm_private *priv = platform_get_drvdata(pdev); - - if (priv->kms_init) - component_del(&pdev->dev, &a3xx_ops); - else - msm_gpu_remove(pdev, &a3xx_ops); ``` But `msm_gpu.c:1072` shows `platform_set_drvdata(pdev, &gpu->adreno_smmu)` -- the drvdata is actually `adreno_smmu_priv`, not `msm_drm_private`. So `priv->kms_init` was reading garbage from an unrelated struct. The fix replaces this with `msm_gpu_use_separate_drm_dev(pdev)`, which doesn't depend on drvdata at all. The Fixes tag referencing `643515a9cd09` is appropriate. --- --- Generated by Claude Code Patch Reviewer