From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot 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 Message-ID: In-Reply-To: <20260226-cmdq-locking-v2-3-c7e16a6d5885@nvidia.com> References: <20260226-cmdq-locking-v2-0-c7e16a6d5885@nvidia.com> <20260226-cmdq-locking-v2-3-c7e16a6d5885@nvidia.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 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` to `impl PinInit`: ```rust - pub(crate) fn new(dev: &device::Device) -> Result { - let gsp_mem = DmaGspMem::new(dev)?; - Ok(Cmdq { + pub(crate) fn new(dev: &device::Device) -> impl PinInit + '_ { + 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