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: gpu: nova: separate driver type from driver data
Date: Wed, 27 May 2026 15:28:23 +1000	[thread overview]
Message-ID: <review-patch5-20260525225838.276108-6-dakr@kernel.org> (raw)
In-Reply-To: <20260525225838.276108-6-dakr@kernel.org>

Patch Review

This splits `NovaDriver` into a unit struct (for trait impls) and a new `Nova` struct (for driver data), enabling the `Data` GAT to be lifetime-parameterized in the future.

```rust
-pub(crate) struct NovaDriver {
+pub(crate) struct NovaDriver;
+
+pub(crate) struct Nova {
     #[expect(unused)]
-    drm: ARef<drm::Device<Self>>,
+    drm: ARef<drm::Device<NovaDriver>>,
 }
```

The `Self` in `ARef<drm::Device<Self>>` correctly becomes `NovaDriver` since the field is now on `Nova`, not `NovaDriver`.

```rust
-    type Data<'bound> = Self;
+    type Data<'bound> = Nova;
```

And the probe return type changes:

```rust
-    ) -> impl PinInit<Self, Error> + 'bound {
+    ) -> impl PinInit<Self::Data<'bound>, Error> + 'bound {
```

With:

```rust
-        Ok(Self { drm })
+        Ok(Nova { drm })
```

This is clean. Note the `Data` type uses a GAT with `'bound` which already appears in the base code (from the prerequisite series). The separation is a standard Rust pattern to allow the data type to carry lifetimes that the driver trait impl type cannot.

**Minor nit:** The existing `Convienence` typo in the doc comment (line 860/`NovaDevice` type alias) is pre-existing and not introduced by this patch.

No issues found.

---
Generated by Claude Code Patch Reviewer

  parent reply	other threads:[~2026-05-27  5:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-25 22:58 [PATCH 0/5] gpu: nova: adopt driver lifetime infrastructure Danilo Krummrich
2026-05-25 22:58 ` [PATCH 1/5] gpu: nova-core: use lifetime for Bar Danilo Krummrich
2026-05-26  2:06   ` Eliot Courtney
2026-05-27  5:28   ` Claude review: " Claude Code Review Bot
2026-05-25 22:58 ` [PATCH 2/5] gpu: nova-core: unregister sysmem flush page from Drop Danilo Krummrich
2026-05-26  1:43   ` Eliot Courtney
2026-05-27  5:28   ` Claude review: " Claude Code Review Bot
2026-05-25 22:58 ` [PATCH 3/5] gpu: nova-core: replace ARef<Device> with &'bound Device in SysmemFlush Danilo Krummrich
2026-05-26  1:44   ` Eliot Courtney
2026-05-27  5:28   ` Claude review: " Claude Code Review Bot
2026-05-25 22:58 ` [PATCH 4/5] gpu: nova-core: gsp: replace ARef<Device> with &'a Device in sequencer Danilo Krummrich
2026-05-26  1:44   ` Eliot Courtney
2026-05-27  5:28   ` Claude review: " Claude Code Review Bot
2026-05-25 22:58 ` [PATCH 5/5] gpu: nova: separate driver type from driver data Danilo Krummrich
2026-05-26  1:46   ` Eliot Courtney
2026-05-27  5:28   ` Claude Code Review Bot [this message]
2026-05-26  7:11 ` [PATCH 0/5] gpu: nova: adopt driver lifetime infrastructure Alexandre Courbot
2026-05-27  5:28 ` 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-patch5-20260525225838.276108-6-dakr@kernel.org \
    --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