[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2a416f38699994a6e709ab7e4990ff17023d4c16.camel@redhat.com>
Date: Thu, 11 Dec 2025 17:06:02 -0500
From: lyude@...hat.com
To: Alexandre Courbot <acourbot@...dia.com>, Danilo Krummrich
<dakr@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>, David Airlie
<airlied@...il.com>, Simona Vetter <simona@...ll.ch>
Cc: John Hubbard <jhubbard@...dia.com>, Alistair Popple
<apopple@...dia.com>, Joel Fernandes <joelagnelf@...dia.com>, Timur Tabi
<ttabi@...dia.com>, Edwin Peer <epeer@...dia.com>,
nouveau@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org
Subject: Re: [PATCH 4/9] gpu: nova-core: gsp: remove unneeded sequencer trait
Reviewed-by: Lyude Paul <lyude@...hat.com>
On Mon, 2025-12-08 at 18:26 +0900, Alexandre Courbot wrote:
> The `GspSeqCmdRunner` trait is never used as we never call the `run`
> methods from generic code. Remove it.
>
> Signed-off-by: Alexandre Courbot <acourbot@...dia.com>
> ---
> drivers/gpu/nova-core/gsp/sequencer.rs | 17 ++++++-----------
> 1 file changed, 6 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/nova-core/gsp/sequencer.rs
> b/drivers/gpu/nova-core/gsp/sequencer.rs
> index 2d0369c49092..4efa048b9d93 100644
> --- a/drivers/gpu/nova-core/gsp/sequencer.rs
> +++ b/drivers/gpu/nova-core/gsp/sequencer.rs
> @@ -147,12 +147,7 @@ pub(crate) struct GspSequencer<'a> {
> dev: ARef<device::Device>,
> }
>
> -/// Trait for running sequencer commands.
> -pub(crate) trait GspSeqCmdRunner {
> - fn run(&self, sequencer: &GspSequencer<'_>) -> Result;
> -}
> -
> -impl GspSeqCmdRunner for fw::RegWritePayload {
> +impl fw::RegWritePayload {
> fn run(&self, sequencer: &GspSequencer<'_>) -> Result {
> let addr = usize::from_safe_cast(self.addr());
>
> @@ -160,7 +155,7 @@ fn run(&self, sequencer: &GspSequencer<'_>) ->
> Result {
> }
> }
>
> -impl GspSeqCmdRunner for fw::RegModifyPayload {
> +impl fw::RegModifyPayload {
> fn run(&self, sequencer: &GspSequencer<'_>) -> Result {
> let addr = usize::from_safe_cast(self.addr());
>
> @@ -172,7 +167,7 @@ fn run(&self, sequencer: &GspSequencer<'_>) ->
> Result {
> }
> }
>
> -impl GspSeqCmdRunner for fw::RegPollPayload {
> +impl fw::RegPollPayload {
> fn run(&self, sequencer: &GspSequencer<'_>) -> Result {
> let addr = usize::from_safe_cast(self.addr());
>
> @@ -197,14 +192,14 @@ fn run(&self, sequencer: &GspSequencer<'_>) ->
> Result {
> }
> }
>
> -impl GspSeqCmdRunner for fw::DelayUsPayload {
> +impl fw::DelayUsPayload {
> fn run(&self, _sequencer: &GspSequencer<'_>) -> Result {
> fsleep(Delta::from_micros(i64::from(self.val())));
> Ok(())
> }
> }
>
> -impl GspSeqCmdRunner for fw::RegStorePayload {
> +impl fw::RegStorePayload {
> fn run(&self, sequencer: &GspSequencer<'_>) -> Result {
> let addr = usize::from_safe_cast(self.addr());
>
> @@ -212,7 +207,7 @@ fn run(&self, sequencer: &GspSequencer<'_>) ->
> Result {
> }
> }
>
> -impl GspSeqCmdRunner for GspSeqCmd {
> +impl GspSeqCmd {
> fn run(&self, seq: &GspSequencer<'_>) -> Result {
> match self {
> GspSeqCmd::RegWrite(cmd) => cmd.run(seq),
Powered by blists - more mailing lists