]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
gpu: nova-core: make Chipset::arch() const
authorAlexandre Courbot <acourbot@nvidia.com>
Fri, 6 Mar 2026 04:52:47 +0000 (13:52 +0900)
committerAlexandre Courbot <acourbot@nvidia.com>
Mon, 9 Mar 2026 01:39:10 +0000 (10:39 +0900)
We will use this method from const context.

Also take `self` by value since it is the size of a primitive type and
implements `Copy`.

Reviewed-by: Eliot Courtney <ecourtney@nvidia.com>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patch.msgid.link/20260306-turing_prep-v11-10-8f0042c5d026@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
drivers/gpu/nova-core/gpu.rs

index 60c85fffaeafd99b02a04344162213348c45e5b3..c14d411c67590200c0ba709e0dc0866fc80a3917 100644 (file)
@@ -92,7 +92,7 @@ define_chipset!({
 });
 
 impl Chipset {
-    pub(crate) fn arch(&self) -> Architecture {
+    pub(crate) const fn arch(self) -> Architecture {
         match self {
             Self::TU102 | Self::TU104 | Self::TU106 | Self::TU117 | Self::TU116 => {
                 Architecture::Turing