summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2026-03-06 07:52:47 +0300
committerAlexandre Courbot <acourbot@nvidia.com>2026-03-09 04:39:10 +0300
commit349b6dbca0acd8a6a27969f712227c36d681b1d0 (patch)
treecd2533c3d1fe7667a78e4c6a392b83c6174d78e5
parent192125e0909e106ae37c2447ec43ee2653909d17 (diff)
downloadlinux-349b6dbca0acd8a6a27969f712227c36d681b1d0.tar.xz
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 <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>
-rw-r--r--drivers/gpu/nova-core/gpu.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs
index 60c85fffaeaf..c14d411c6759 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