]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
gpu: nova-core: use SizeConstants trait for u64 size constants
authorJohn Hubbard <jhubbard@nvidia.com>
Sat, 11 Apr 2026 02:41:17 +0000 (19:41 -0700)
committerDanilo Krummrich <dakr@kernel.org>
Tue, 28 Apr 2026 22:57:54 +0000 (00:57 +0200)
commit98e508e5b016cac054ed0f95694a7a3b240108bb
tree6e9fe9f5379422fc104de8086ed322ec8dfb1c37
parentd9a6809478f9815b6455a327aa001737ac7b2c09
gpu: nova-core: use SizeConstants trait for u64 size constants

Replace manual usize-to-u64 conversions of SZ_* constants with the
SizeConstants trait's associated constants on u64. With the
SizeConstants trait in scope, u64::SZ_1M replaces usize_as_u64(SZ_1M)
and similar.

This removes several now-unused imports: usize_as_u64, FromSafeCast,
and individual SZ_* type-level constants.

Reviewed-by: Eliot Courtney <ecourtney@nvidia.com>
Reviewed-by: Joel Fernandes <joelagnelf@nvidia.com>
Acked-by: Gary Guo <gary@garyguo.net>
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Link: https://patch.msgid.link/20260411024118.471294-2-jhubbard@nvidia.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
drivers/gpu/nova-core/fb.rs
drivers/gpu/nova-core/gsp/fw.rs
drivers/gpu/nova-core/regs.rs