From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: gpu: nova-core: gsp: make `Cmdq` a pinned type
Date: Fri, 27 Feb 2026 12:04:09 +1000 [thread overview]
Message-ID: <review-patch3-20260226-cmdq-locking-v2-3-c7e16a6d5885@nvidia.com> (raw)
In-Reply-To: <20260226-cmdq-locking-v2-3-c7e16a6d5885@nvidia.com>
Patch Review
**Status: Looks good**
A clean mechanical change to make `Cmdq` pin-initialized, required for the `Mutex` in patch 4.
Adding `#[pin_data]` and `#[pin]`:
```rust
+#[pin_data]
pub(crate) struct Cmdq {
...
```
Changing the constructor from `Result<Cmdq>` to `impl PinInit<Self, Error>`:
```rust
- pub(crate) fn new(dev: &device::Device<device::Bound>) -> Result<Cmdq> {
- let gsp_mem = DmaGspMem::new(dev)?;
- Ok(Cmdq {
+ pub(crate) fn new(dev: &device::Device<device::Bound>) -> impl PinInit<Self, Error> + '_ {
+ try_pin_init!(Self {
+ gsp_mem: DmaGspMem::new(dev)?,
dev: dev.into(),
seq: 0,
- gsp_mem,
})
```
Updating the caller in `gsp.rs` to use pin-init syntax:
```rust
- cmdq: Cmdq::new(dev)?,
+ cmdq <- Cmdq::new(dev),
```
And the reference change since `cmdq` is now behind a pin:
```rust
- dma_write!(rmargs[0].inner = fw::GspArgumentsCached::new(cmdq))?;
+ dma_write!(rmargs[0].inner = fw::GspArgumentsCached::new(&cmdq))?;
```
No issues. Already has Reviewed-by from Zhi Wang.
---
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-02-27 2:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-26 14:50 [PATCH v2 0/4] gpu: nova-core: gsp: add locking to Cmdq Eliot Courtney
2026-02-26 14:50 ` [PATCH v2 1/4] gpu: nova-core: gsp: fix stale doc comments on command queue methods Eliot Courtney
2026-02-27 2:04 ` Claude review: " Claude Code Review Bot
2026-02-26 14:50 ` [PATCH v2 2/4] gpu: nova-core: gsp: add sync and async command queue API to `Cmdq` Eliot Courtney
2026-02-27 2:04 ` Claude review: " Claude Code Review Bot
2026-02-26 14:50 ` [PATCH v2 3/4] gpu: nova-core: gsp: make `Cmdq` a pinned type Eliot Courtney
2026-02-27 2:04 ` Claude Code Review Bot [this message]
2026-02-26 14:50 ` [PATCH v2 4/4] gpu: nova-core: gsp: add mutex locking to Cmdq Eliot Courtney
2026-02-27 2:04 ` Claude review: " Claude Code Review Bot
2026-02-26 18:48 ` [PATCH v2 0/4] gpu: nova-core: gsp: add " Zhi Wang
2026-02-27 2:04 ` Claude review: " Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-03-10 8:09 [PATCH v4 0/5] " Eliot Courtney
2026-03-10 8:09 ` [PATCH v4 4/5] gpu: nova-core: gsp: make `Cmdq` a pinned type Eliot Courtney
2026-03-11 3:32 ` Claude review: " Claude Code Review Bot
2026-03-04 2:46 [PATCH v3 0/5] gpu: nova-core: gsp: add locking to Cmdq Eliot Courtney
2026-03-04 2:46 ` [PATCH v3 4/5] gpu: nova-core: gsp: make `Cmdq` a pinned type Eliot Courtney
2026-03-05 3:53 ` Claude review: " Claude Code Review Bot
2026-02-25 13:41 [PATCH 0/4] gpu: nova-core: gsp: add locking to Cmdq Eliot Courtney
2026-02-25 13:41 ` [PATCH 3/4] gpu: nova-core: gsp: make `Cmdq` a pinned type Eliot Courtney
2026-02-27 3:18 ` 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-patch3-20260226-cmdq-locking-v2-3-c7e16a6d5885@nvidia.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