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/msm: Centralize the standalone drm device check for GPU
Date: Sat, 16 May 2026 12:47:07 +1000	[thread overview]
Message-ID: <review-patch2-20260513-gmu-sync-state-fix-v1-2-6e33e6aa9b4f@oss.qualcomm.com> (raw)
In-Reply-To: <20260513-gmu-sync-state-fix-v1-2-6e33e6aa9b4f@oss.qualcomm.com>

Patch Review

**Verdict: Acceptable, but the NULL parameter convention is awkward.**

The rename from `msm_gpu_no_components()` to `msm_gpu_use_separate_drm_dev(pdev)` centralizes the `amd,imageon` compatibility check. However, the two call sites in `msm_drv.c` pass `NULL`:

```c
+			    msm_gpu_use_separate_drm_dev(NULL) ?
```
```c
+	if (!msm_gpu_use_separate_drm_dev(NULL)) {
```

And the function has a special case for NULL:

```c
+bool msm_gpu_use_separate_drm_dev(struct platform_device *pdev)
+{
+	if (!pdev)
+		return separate_gpu_kms;
+
+	return of_device_is_compatible(pdev->dev.of_node, "amd,imageon") || separate_gpu_kms;
+}
```

Passing `NULL` to skip the imageon check is a code smell. These callers don't have a pdev and really only care about `separate_gpu_kms`. Consider either keeping a no-argument helper for that case, or documenting why the NULL-with-different-semantics pattern is intentional. As-is, a reader has to read the function body to understand that `NULL` means "just check the module param."

---

---
Generated by Claude Code Patch Reviewer

  parent reply	other threads:[~2026-05-16  2:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12 20:52 [PATCH RFT 0/5] drm/msm: Attach a driver to GMU Akhil P Oommen
2026-05-12 20:52 ` [PATCH RFT 1/5] drm/msm/adreno/a6xx: Mark cxpd device_link as stateless Akhil P Oommen
2026-05-13  0:56   ` Dmitry Baryshkov
2026-05-16  2:47   ` Claude review: " Claude Code Review Bot
2026-05-12 20:52 ` [PATCH RFT 2/5] drm/msm: Centralize the standalone drm device check for GPU Akhil P Oommen
2026-05-13  5:41   ` Dmitry Baryshkov
2026-05-13 21:10     ` Akhil P Oommen
2026-05-16  2:47   ` Claude Code Review Bot [this message]
2026-05-12 20:52 ` [PATCH RFT 3/5] drm/msm/adreno: Fix invalid drvdata typecast in adreno_remove() Akhil P Oommen
2026-05-13  5:39   ` Dmitry Baryshkov
2026-05-16  2:47   ` Claude review: " Claude Code Review Bot
2026-05-12 20:52 ` [PATCH RFT 4/5] drm/msm: Always use component model for standalone GPU Akhil P Oommen
2026-05-13 11:43   ` Dmitry Baryshkov
2026-05-13 21:09     ` Akhil P Oommen
2026-05-16  2:47   ` Claude review: " Claude Code Review Bot
2026-05-12 20:53 ` [PATCH RFT 5/5] drm/msm: Attach a driver to the GMU Akhil P Oommen
2026-05-13 11:46   ` Dmitry Baryshkov
2026-05-16  2:47   ` Claude review: " Claude Code Review Bot
2026-05-16  2:47 ` Claude review: drm/msm: Attach a driver to GMU 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-patch2-20260513-gmu-sync-state-fix-v1-2-6e33e6aa9b4f@oss.qualcomm.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