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: pci: 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-2-gary@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>

authored by

Gary Guo and committed by
Danilo Krummrich
600de1c0 a38cd1fe

+5 -5
+1 -1
rust/kernel/pci.rs
··· 348 348 /// // Get an instance of `Vendor`. 349 349 /// let vendor = pdev.vendor_id(); 350 350 /// dev_info!( 351 - /// pdev.as_ref(), 351 + /// pdev, 352 352 /// "Device: Vendor={}, Device=0x{:x}\n", 353 353 /// vendor, 354 354 /// pdev.device_id()
+1 -1
rust/kernel/pci/id.rs
··· 22 22 /// fn probe_device(pdev: &pci::Device<Core>) -> Result { 23 23 /// let pci_class = pdev.pci_class(); 24 24 /// dev_info!( 25 - /// pdev.as_ref(), 25 + /// pdev, 26 26 /// "Detected PCI class: {}\n", 27 27 /// pci_class 28 28 /// );
+3 -3
samples/rust/rust_driver_pci.rs
··· 101 101 pin_init::pin_init_scope(move || { 102 102 let vendor = pdev.vendor_id(); 103 103 dev_dbg!( 104 - pdev.as_ref(), 104 + pdev, 105 105 "Probe Rust PCI driver sample (PCI ID: {}, 0x{:x}).\n", 106 106 vendor, 107 107 pdev.device_id() ··· 117 117 let bar = bar.access(pdev.as_ref())?; 118 118 119 119 dev_info!( 120 - pdev.as_ref(), 120 + pdev, 121 121 "pci-testdev data-match count: {}\n", 122 122 Self::testdev(info, bar)? 123 123 ); ··· 139 139 #[pinned_drop] 140 140 impl PinnedDrop for SampleDriver { 141 141 fn drop(self: Pin<&mut Self>) { 142 - dev_dbg!(self.pdev.as_ref(), "Remove Rust PCI driver sample.\n"); 142 + dev_dbg!(self.pdev, "Remove Rust PCI driver sample.\n"); 143 143 } 144 144 } 145 145