From: Alexandre Courbot Date: Fri, 6 Mar 2026 04:52:47 +0000 (+0900) Subject: gpu: nova-core: make Chipset::arch() const X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=349b6dbca0acd8a6a27969f712227c36d681b1d0;p=thirdparty%2Flinux.git gpu: nova-core: make Chipset::arch() const 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 Acked-by: Danilo Krummrich Link: https://patch.msgid.link/20260306-turing_prep-v11-10-8f0042c5d026@nvidia.com Signed-off-by: Alexandre Courbot --- diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs index 60c85fffaeafd..c14d411c67590 100644 --- a/drivers/gpu/nova-core/gpu.rs +++ b/drivers/gpu/nova-core/gpu.rs @@ -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