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/tyr: Clarify driver/device type names
Date: Tue, 24 Feb 2026 09:38:58 +1000	[thread overview]
Message-ID: <review-patch1-20260223204648.208886-1-deborah.brouwer@collabora.com> (raw)
In-Reply-To: <20260223204648.208886-1-deborah.brouwer@collabora.com>

Patch Review

The commit message is clear and accurately describes the changes. The "no functional changes intended" claim is correct.

**Type alias inconsistency across files:**

In driver.rs, the patch defines the type alias:

> +pub(crate) type TyrDrmDevice = drm::Device<TyrDrmDriver>;

But in file.rs, the `dev_query` parameter is changed to spell out the full type instead of using the alias:

> +        ddev: &drm::Device<TyrDrmDriver>,

And in gem.rs similarly:

> +    fn new(_dev: &kernel::drm::Device<TyrDrmDriver>, _size: usize) -> impl PinInit<Self, Error> {

The old code used the `TyrDevice` alias in both file.rs and gem.rs (via `use crate::driver::TyrDevice`). The new code drops those imports and writes out the full type. If the `TyrDrmDevice` alias is going to be defined, it would be more consistent to use it everywhere as the old code did with `TyrDevice`. Otherwise the alias only serves one site (the `_device` field in `TyrPlatformDeviceData`). This is not a correctness issue but it defeats the purpose of the convenience alias.

Also note that gem.rs spells it `kernel::drm::Device<TyrDrmDriver>` while file.rs spells it `drm::Device<TyrDrmDriver>` -- this is because file.rs has `use kernel::drm` at the top while gem.rs uses `use kernel::drm::gem` and doesn't import the `drm` module directly. If the `TyrDrmDevice` alias were used, this inconsistency would go away.

**Naming convention (already noted by Danilo):**

> +pub(crate) struct TyrPlatformDeviceData {

Danilo's point about `TyrPlatformDriverData` being a better name is well-taken. The C subsystem uses `platform_set_drvdata()`/`platform_get_drvdata()` -- it is *driver* private data stored in the platform device, not device data. This is the main item to address in a v3.

**Everything else looks correct.** The `Send`/`Sync` impls, `PinnedDrop` impls, `platform::Driver` impl, `drm::Driver` impl, `module_platform_driver!` macro, ioctl declaration, and `DriverFile` impl are all updated consistently to the new names. The probe function correctly constructs `TyrDrmDeviceData` and `TyrPlatformDeviceData` in the right order. No functional behavior is changed.

---
Generated by Claude Code Patch Reviewer

  parent reply	other threads:[~2026-02-23 23:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-23 20:46 [PATCH v2] drm/tyr: Clarify driver/device type names Deborah Brouwer
2026-02-23 21:41 ` Danilo Krummrich
2026-02-23 23:38 ` Claude Code Review Bot [this message]
2026-02-23 23:38 ` Claude review: " 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-patch1-20260223204648.208886-1-deborah.brouwer@collabora.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