Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Alexandre Courbot and committed by
Danilo Krummrich
297b2cd6 cdeaeb9d

+1 -1
+1 -1
drivers/gpu/nova-core/gpu.rs
··· 13 13 ({ $($variant:ident = $value:expr),* $(,)* }) => 14 14 { 15 15 /// Enum representation of the GPU chipset. 16 - #[derive(fmt::Debug)] 16 + #[derive(fmt::Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] 17 17 pub(crate) enum Chipset { 18 18 $($variant = $value),*, 19 19 }