mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 17:43:52 +02:00
gpu: nova-core: derive useful traits for Chipset
We will commonly need to compare chipset versions, so derive the ordering traits to make that possible. Also derive Copy and Clone since passing Chipset by value will be more efficient than by reference. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Link: https://lore.kernel.org/r/20250507-nova-frts-v3-2-fcb02749754d@nvidia.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
This commit is contained in:
parent
cdeaeb9dd7
commit
297b2cd6ba
|
|
@ -13,7 +13,7 @@ macro_rules! define_chipset {
|
|||
({ $($variant:ident = $value:expr),* $(,)* }) =>
|
||||
{
|
||||
/// Enum representation of the GPU chipset.
|
||||
#[derive(fmt::Debug)]
|
||||
#[derive(fmt::Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
|
||||
pub(crate) enum Chipset {
|
||||
$($variant = $value),*,
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user