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.

rust: samples: dma: remove redundant `.as_ref()` for `dev_*` print

This is now handled by the macro itself.

Signed-off-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260123175854.176735-4-gary@kernel.org
[ Fix up code formatting. - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>

authored by

Gary Guo and committed by
Danilo Krummrich
f8ed7a49 3be458a5

+8 -5
+8 -5
samples/rust/rust_dma.rs
··· 57 57 58 58 fn probe(pdev: &pci::Device<Core>, _info: &Self::IdInfo) -> impl PinInit<Self, Error> { 59 59 pin_init::pin_init_scope(move || { 60 - dev_info!(pdev.as_ref(), "Probe DMA test driver.\n"); 60 + dev_info!(pdev, "Probe DMA test driver.\n"); 61 61 62 62 let mask = DmaMask::new::<64>(); 63 63 ··· 88 88 #[pinned_drop] 89 89 impl PinnedDrop for DmaSampleDriver { 90 90 fn drop(self: Pin<&mut Self>) { 91 - let dev = self.pdev.as_ref(); 92 - 93 - dev_info!(dev, "Unload DMA test driver.\n"); 91 + dev_info!(self.pdev, "Unload DMA test driver.\n"); 94 92 95 93 for (i, value) in TEST_VALUES.into_iter().enumerate() { 96 94 let val0 = kernel::dma_read!(self.ca[i].h); ··· 105 107 } 106 108 107 109 for (i, entry) in self.sgt.iter().enumerate() { 108 - dev_info!(dev, "Entry[{}]: DMA address: {:#x}", i, entry.dma_address()); 110 + dev_info!( 111 + self.pdev, 112 + "Entry[{}]: DMA address: {:#x}", 113 + i, 114 + entry.dma_address(), 115 + ); 109 116 } 110 117 } 111 118 }