Re: [PATCH v2 7/9] gpu: nova-core: gsp: add RM control command infrastructure

From: Eliot Courtney

Date: Wed Mar 18 2026 - 21:06:43 EST


On Wed Mar 18, 2026 at 9:35 PM JST, Danilo Krummrich wrote:
>> +/// Sends an RM control command, checks the reply status, and returns the raw parameter bytes.
>> +#[expect(dead_code)]
>> +fn send_rm_control<T>(cmdq: &Cmdq, bar: &Bar0, cmd: RmControl<'_, T>) -> Result<KVVec<u8>> {
>> + let reply = cmdq.send_command(bar, cmd)?;
>> +
>> + Result::from(reply.status)?;
>> +
>> + Ok(reply.params)
>> +}
>
> It still feels wrong to me for this to be a standalone function.
>
> It should either be a method of Cmdq, or it should be a method of RmControl,
> that takes self by value, i.e. either Cmdq::send_rm_ctrl() or RmControl::send().
>
> Please choose one of those options.

RmControl::send() seems good to me, will do that one.