On Tue Mar 3, 2026 at 12:47 PM JST, Eliot Courtney wrote:
> On Tue Mar 3, 2026 at 2:36 AM JST, Gary Guo wrote:
>>> +impl CmdqInner {
>>>      /// Sends `command` to the GSP, without splitting it.
>>>      ///
>>>      /// # Errors
>>> @@ -540,7 +493,7 @@ fn notify_gsp(bar: &Bar0) {
>>>      ///   written to by its [`CommandToGsp::init_variable_payload`] method.
>>>      ///
>>>      /// Error codes returned by the command initializers are propagated 
>>> as-is.
>>> -    fn send_single_command<M>(&mut self, bar: &Bar0, command: M) -> Result
>>> +    fn send_single_command<M>(&mut self, dev: &device::Device, bar: &Bar0, 
>>> command: M) -> Result
>>
>> Any reason that the `dev` is passed in everything instead of just have it be
>> part of `CmdqInner`?
>>
>> It appears that the `Cmdq` methods don't actually use it apart from passing 
>> it
>> to `CmdqInner`.
>
> Not a strong reason - I originally thought it would be a bit nicer if
> CmdqInner only contains what we actually want to lock on. But I think
> this way is good too, so I will update it. Thanks~

Right, when the only purpose of passing the `Device` is to print log
messages, we prefer to store a reference to it to make the API simpler -
other parts of Nova do that.

If we require a bound device, that's another story and in this case it
is (so far) passed as an argument.

Reply via email to