Skip to content

Commit 297b2cd

Browse files
GnurouDanilo Krummrich
authored andcommitted
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>
1 parent cdeaeb9 commit 297b2cd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/nova-core/gpu.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ macro_rules! define_chipset {
1313
({ $($variant:ident = $value:expr),* $(,)* }) =>
1414
{
1515
/// Enum representation of the GPU chipset.
16-
#[derive(fmt::Debug)]
16+
#[derive(fmt::Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
1717
pub(crate) enum Chipset {
1818
$($variant = $value),*,
1919
}

0 commit comments

Comments
 (0)