mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 04:21:09 -04:00
gpu: nova-core: gsp: remove unneeded sequencer trait
The `GspSeqCmdRunner` trait is never used as we never call the `run` methods from generic code. Remove it. Reviewed-by: Lyude Paul <lyude@redhat.com> Reviewed-by: Gary Guo <gary@garyguo.net> Reviewed-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20260217-nova-misc-v3-4-b4e2d45eafbc@nvidia.com Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
This commit is contained in:
@@ -144,12 +144,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());
|
||||
|
||||
@@ -157,7 +152,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());
|
||||
|
||||
@@ -169,7 +164,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());
|
||||
|
||||
@@ -194,14 +189,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());
|
||||
|
||||
@@ -209,7 +204,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),
|
||||
|
||||
Reference in New Issue
Block a user