mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
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 <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>
This commit is contained in:
parent
a47e2cd4b1
commit
46d455853d
|
|
@ -160,6 +160,7 @@ pub(crate) enum Architecture with TryFrom<Bounded<u32, 6>> {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub(crate) struct Revision {
|
||||
major: Bounded<u8, 4>,
|
||||
minor: Bounded<u8, 4>,
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user