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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Danilo Krummrich <[email protected]>
1 parent cdeaeb9 commit 297b2cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)