]> Gentwo Git Trees - linux/.git/commitdiff
gpu: nova-core: gsp: remove useless conversion
authorDanilo Krummrich <dakr@kernel.org>
Fri, 26 Sep 2025 13:05:52 +0000 (15:05 +0200)
committerAlexandre Courbot <acourbot@nvidia.com>
Wed, 15 Oct 2025 23:04:46 +0000 (08:04 +0900)
Because nova-core depends on CONFIG_64BIT and a raw DmaAddress is
always a u64, we can remove the now actually useless conversion.

Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
[acourbot@nvidia.com: reword commit as suggested by John.]
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Message-ID: <20250926130623.61316-1-dakr@kernel.org>

drivers/gpu/nova-core/firmware/gsp.rs

index 9b70095434c61f30927463d0c869fbd666e7ef7a..ca785860e1c82ab5187e1600cea79dc1aad0598a 100644 (file)
@@ -202,8 +202,7 @@ pub(crate) fn new<'a, 'b>(
                 let mut level0_data = kvec![0u8; GSP_PAGE_SIZE]?;
 
                 // Fill level 1 page entry.
-                #[allow(clippy::useless_conversion)]
-                let level1_entry = u64::from(level1.iter().next().unwrap().dma_address());
+                let level1_entry = level1.iter().next().unwrap().dma_address();
                 let dst = &mut level0_data[..size_of_val(&level1_entry)];
                 dst.copy_from_slice(&level1_entry.to_le_bytes());