From 46d455853da6aa20ce07a23cb053bcf5a87098eb Mon Sep 17 00:00:00 2001 From: John Hubbard Date: Fri, 10 Apr 2026 19:49:29 -0700 Subject: [PATCH] gpu: nova-core: add Copy/Clone to Spec and Revision Derive Clone and Copy for Revision and Spec. Both are small value types (4 bytes total) and Copy makes them easier to use in later patches that pass them across function boundaries. Signed-off-by: John Hubbard Acked-by: Danilo Krummrich Reviewed-by: Gary Guo Link: https://patch.msgid.link/20260411024953.473149-5-jhubbard@nvidia.com Signed-off-by: Alexandre Courbot --- drivers/gpu/nova-core/gpu.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs index 6a01b85f9489..3e908b65d7a9 100644 --- a/drivers/gpu/nova-core/gpu.rs +++ b/drivers/gpu/nova-core/gpu.rs @@ -160,6 +160,7 @@ pub(crate) enum Architecture with TryFrom> { } } +#[derive(Clone, Copy)] pub(crate) struct Revision { major: Bounded, minor: Bounded, @@ -181,6 +182,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { } /// Structure holding a basic description of the GPU: `Chipset` and `Revision`. +#[derive(Clone, Copy)] pub(crate) struct Spec { chipset: Chipset, revision: Revision,