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: convert Gsp::new() to use CoherentBox Date: Sun, 22 Mar 2026 03:23:44 +1000 Message-ID: In-Reply-To: <20260320194626.36263-8-dakr@kernel.org> References: <20260320194626.36263-1-dakr@kernel.org> <20260320194626.36263-8-dakr@kernel.org> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review Converts `libos` and `rmargs` initialization to use `CoherentBox` and `Cohe= rent::init()` respectively. **Ordering concern in `try_pin_init!`**: The new code initializes fields in= this order: ```rust loginit: LogBuffer::new(dev)?, logintr: LogBuffer::new(dev)?, logrm: LogBuffer::new(dev)?, cmdq <- Cmdq::new(dev), rmargs: Coherent::init(dev, GFP_KERNEL, GspArgumentsPadded::new(&cmdq))?, libos: { ... libos.init_at(3, ..., rmargs)? ... libos.into() }, ``` The `libos` initialization at element 3 references `rmargs` =E2=80=94 this = works because within `try_pin_init!`, earlier field bindings are accessible= to later fields. The `rmargs` reference used in `LibosMemoryRegionInitArgu= ment::new("RMARGS", rmargs)` is a `&Coherent`. This sho= uld work since `rmargs` has been initialized by that point in the macro exp= ansion. **`MessageQueueInitArguments` type alias change**: Changed from a newtype `= struct MessageQueueInitArguments(bindings::MESSAGE_QUEUE_INIT_ARGUMENTS)` t= o a plain type alias `type MessageQueueInitArguments =3D bindings::MESSAGE_= QUEUE_INIT_ARGUMENTS`. Then `impl MessageQueueInitArguments` adds a `new()`= method returning `impl Init`. This is a clean simplification since t= he wrapper served no purpose beyond the constructor. The `#[allow(non_snake_case)]` on the `new` function for `MessageQueueInitA= rguments` is needed since the `init!` macro generates bindings for the came= lCase fields. --- Generated by Claude Code Patch Reviewer