]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
gpu: nova-core: add Copy/Clone to Spec and Revision
authorJohn Hubbard <jhubbard@nvidia.com>
Sat, 11 Apr 2026 02:49:29 +0000 (19:49 -0700)
committerAlexandre Courbot <acourbot@nvidia.com>
Thu, 30 Apr 2026 01:02:55 +0000 (10:02 +0900)
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 <jhubbard@nvidia.com>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260411024953.473149-5-jhubbard@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
drivers/gpu/nova-core/gpu.rs

index 6a01b85f94898484037382638b2788333b5222d8..3e908b65d7a9660a09c4922852116d5e86be88cf 100644 (file)
@@ -160,6 +160,7 @@ bounded_enum! {
     }
 }
 
+#[derive(Clone, Copy)]
 pub(crate) struct Revision {
     major: Bounded<u8, 4>,
     minor: Bounded<u8, 4>,
@@ -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,