From: John Hubbard Date: Sat, 11 Apr 2026 02:49:29 +0000 (-0700) Subject: gpu: nova-core: add Copy/Clone to Spec and Revision X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=46d455853da6aa20ce07a23cb053bcf5a87098eb;p=thirdparty%2Fkernel%2Flinux.git 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 --- diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs index 6a01b85f94898..3e908b65d7a96 100644 --- a/drivers/gpu/nova-core/gpu.rs +++ b/drivers/gpu/nova-core/gpu.rs @@ -160,6 +160,7 @@ bounded_enum! { } } +#[derive(Clone, Copy)] pub(crate) struct Revision { major: Bounded, minor: Bounded, @@ -181,6 +182,7 @@ impl fmt::Display for Revision { } /// Structure holding a basic description of the GPU: `Chipset` and `Revision`. +#[derive(Clone, Copy)] pub(crate) struct Spec { chipset: Chipset, revision: Revision,