Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
to consider:
- [Low] rust: broken rustdoc intra-doc links after method renaming
--

commit 41ab580cce9e4df6dca3c50983301c4f117e6a64
Author: Alexandre Courbot <[email protected]>

gpu: nova-core: gsp: add `rpc` to RPC message send/receive methods

Since we are going to introduce a second type of message, add `rpc` to
the names of the relevant command queue methods so we can distinguish
between the two.

> diff --git a/drivers/gpu/nova-core/gsp/cmdq/rpc.rs 
> b/drivers/gpu/nova-core/gsp/cmdq/rpc.rs
> index 335f94c4d2aac..81f8c79b1bb53 100644
> --- a/drivers/gpu/nova-core/gsp/cmdq/rpc.rs
> +++ b/drivers/gpu/nova-core/gsp/cmdq/rpc.rs
[ ... ]
> @@ -216,7 +216,7 @@ fn send_command<M>(&mut self, command: M) -> Result
>          }
>      }
>  
> -    fn wait_for_msg(&self, timeout: Delta) -> Result<GspMessage<'_>> {
> +    fn wait_for_rpc_msg(&self, timeout: Delta) -> Result<GspMessage<'_>> {
>          let GspMessage {

[Severity: Low]
Are there stale rustdoc links in drivers/gpu/nova-core/gsp/cmdq.rs after
this rename?

drivers/gpu/nova-core/gsp/cmdq.rs:
/// This is the type returned by [`CmdqInner::wait_for_msg`].
struct GspMessage<'a> {

>              header,
>              contents: (slice_1, slice_2),
[ ... ]
> @@ -275,12 +275,12 @@ fn wait_for_msg(&self, timeout: Delta) -> 
> Result<GspMessage<'_>> {
>      /// - `ERANGE` if the message had a recognized but non-matching function 
> code.
>      ///
>      /// Error codes returned by [`MessageFromGsp::read`] are propagated 
> as-is.
> -    fn receive_msg<M: MessageFromGsp>(&mut self, timeout: Delta) -> Result<M>
> +    fn receive_rpc_msg<M: MessageFromGsp>(&mut self, timeout: Delta) -> 
> Result<M>

[Severity: Low]
Could this method rename break the intra-doc link for MessageFromGsp in
this same file?

drivers/gpu/nova-core/gsp/cmdq/rpc.rs:
/// This trait tells [`Cmdq::receive_msg`] how it can receive a given type of 
message.
pub(crate) trait MessageFromGsp: Sized {

>      where
>          // This allows all error types, including `Infallible`, to be used 
> for `M::InitError`.
>          Error: From<M::InitError>,
>      {
> -        let message = self.wait_for_msg(timeout)?;
> +        let message = self.wait_for_rpc_msg(timeout)?;
[ ... ]
> @@ -357,22 +357,22 @@ pub(crate) fn send_command<M>(&self, command: M) -> 
> Result<M::Reply>
>      ///   written to by its [`CommandToGsp::init_variable_payload`] method.
>      ///
>      /// Error codes returned by the command initializers are propagated 
> as-is.
> -    pub(crate) fn send_command_no_wait<M>(&self, command: M) -> Result
> +    pub(crate) fn send_rpc_command_no_wait<M>(&self, command: M) -> Result

[Severity: Low]
Will this change leave a broken rustdoc link in 
drivers/gpu/nova-core/gsp/cmdq.rs?

drivers/gpu/nova-core/gsp/cmdq.rs:
/// Marker type representing the absence of a reply for a command. Commands 
using this as their
/// reply type are sent using [`Cmdq::send_command_no_wait`].
pub(crate) struct NoReply;

>      where
>          M: CommandToGsp<Reply = NoReply>,
>          Error: From<M::InitError>,
>      {
> -        self.inner.lock().send_command(command)
> +        self.inner.lock().send_rpc_command(command)
>      }
>  
>      /// Receive a message from the GSP.
>      ///
>      /// See [`CmdqInner::receive_msg`] for details.
> -    pub(crate) fn receive_msg<M: MessageFromGsp>(&self, timeout: Delta) -> 
> Result<M>
> +    pub(crate) fn receive_rpc_msg<M: MessageFromGsp>(&self, timeout: Delta) 
> -> Result<M>

[Severity: Low]
It looks like this method rename might have missed its own doc comment right
above it:

    /// See [`CmdqInner::receive_msg`] for details.

>      where
>          // This allows all error types, including `Infallible`, to be used 
> for `M::InitError`.
>          Error: From<M::InitError>,
>      {
> -        self.inner.lock().receive_msg(timeout)
> +        self.inner.lock().receive_rpc_msg(timeout)
>      }
>  }

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=10

Reply via email to