diff options
| author | Gary Guo <gary@garyguo.net> | 2026-01-23 17:58:41 +0000 |
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2026-01-24 12:30:10 +0100 |
| commit | f8ed7a49d40aea7769d80e05a3b7b14594cb3aef (patch) | |
| tree | 029f06394103a74a201803b711e5390f51625cb8 | |
| parent | 3be458a5a7ed57cb874474aee7929daed0d5d3aa (diff) | |
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>
| -rw-r--r-- | samples/rust/rust_dma.rs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/samples/rust/rust_dma.rs b/samples/rust/rust_dma.rs index f53bce2a73e3..9c45851c876e 100644 --- a/samples/rust/rust_dma.rs +++ b/samples/rust/rust_dma.rs @@ -57,7 +57,7 @@ impl pci::Driver for DmaSampleDriver { fn probe(pdev: &pci::Device<Core>, _info: &Self::IdInfo) -> impl PinInit<Self, Error> { pin_init::pin_init_scope(move || { - dev_info!(pdev.as_ref(), "Probe DMA test driver.\n"); + dev_info!(pdev, "Probe DMA test driver.\n"); let mask = DmaMask::new::<64>(); @@ -88,9 +88,7 @@ impl pci::Driver for DmaSampleDriver { #[pinned_drop] impl PinnedDrop for DmaSampleDriver { fn drop(self: Pin<&mut Self>) { - let dev = self.pdev.as_ref(); - - dev_info!(dev, "Unload DMA test driver.\n"); + dev_info!(self.pdev, "Unload DMA test driver.\n"); for (i, value) in TEST_VALUES.into_iter().enumerate() { let val0 = kernel::dma_read!(self.ca[i].h); @@ -107,7 +105,12 @@ impl PinnedDrop for DmaSampleDriver { } for (i, entry) in self.sgt.iter().enumerate() { - dev_info!(dev, "Entry[{}]: DMA address: {:#x}", i, entry.dma_address()); + dev_info!( + self.pdev, + "Entry[{}]: DMA address: {:#x}", + i, + entry.dma_address(), + ); } } } |
