On Wed Mar 4, 2026 at 11:53 AM JST, Alexandre Courbot wrote: > On Wed Mar 4, 2026 at 10:42 AM JST, Eliot Courtney wrote: >> Add a default method to `CommandToGsp` which computes the size of a >> command. >> >> Tested-by: Zhi Wang <[email protected]> >> Signed-off-by: Eliot Courtney <[email protected]> >> --- >> drivers/gpu/nova-core/gsp/cmdq.rs | 12 +++++++++--- >> 1 file changed, 9 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/gpu/nova-core/gsp/cmdq.rs >> b/drivers/gpu/nova-core/gsp/cmdq.rs >> index 48cf28b41f39..3424be4e15f8 100644 >> --- a/drivers/gpu/nova-core/gsp/cmdq.rs >> +++ b/drivers/gpu/nova-core/gsp/cmdq.rs >> @@ -94,6 +94,12 @@ fn init_variable_payload( >> ) -> Result { >> Ok(()) >> } >> + >> + /// Total size of the command (including its variable-length payload) >> without the >> + /// [`GspMsgElement`] header. >> + fn size_in_bytes(&self) -> usize { > > We usually don't specify the unit in the method name (the doccomment is > a better place for that). I can fix this when applying.
Thanks, I will make a note of this so I don't make this mistake again. I wanted to clarify this since size for a command could mean a few things.
