Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

gpu: nova-core: make formatting compatible with rust tree

Commit 38b7cc448a5b ("gpu: nova-core: implement Display for Spec") in
drm-rust-next introduced some usage of the Display trait, but the
Display trait is being modified in the rust tree this cycle. Thus, to
avoid conflicts with the Rust tree, tweak how the formatting machinery
is used in a way where it works both with and without the changes in the
Rust tree.

Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Tested-by: Alexandre Courbot <acourbot@nvidia.com>
Link: https://patch.msgid.link/20251117-nova-fmt-rust-v1-1-651ca28cd98f@google.com
Signed-off-by: Alice Ryhl <aliceryhl@google.com>

+4 -7
+2 -3
drivers/gpu/nova-core/gpu.rs
··· 227 227 228 228 impl fmt::Display for Spec { 229 229 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 230 - write!( 231 - f, 230 + f.write_fmt(fmt!( 232 231 "Chipset: {}, Architecture: {:?}, Revision: {}", 233 232 self.chipset, 234 233 self.chipset.arch(), 235 234 self.revision 236 - ) 235 + )) 237 236 } 238 237 } 239 238
+2 -4
drivers/gpu/nova-core/gsp/fw.rs
··· 6 6 // Alias to avoid repeating the version number with every use. 7 7 use r570_144 as bindings; 8 8 9 - use core::{ 10 - fmt, 11 - ops::Range, // 12 - }; 9 + use core::ops::Range; 13 10 14 11 use kernel::{ 15 12 dma::CoherentAllocation, 13 + fmt, 16 14 prelude::*, 17 15 ptr::{ 18 16 Alignable,