mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02:00
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>
This commit is contained in:
parent
a38cd1fea9
commit
600de1c008
|
|
@ -348,7 +348,7 @@ impl Device {
|
||||||
/// // Get an instance of `Vendor`.
|
/// // Get an instance of `Vendor`.
|
||||||
/// let vendor = pdev.vendor_id();
|
/// let vendor = pdev.vendor_id();
|
||||||
/// dev_info!(
|
/// dev_info!(
|
||||||
/// pdev.as_ref(),
|
/// pdev,
|
||||||
/// "Device: Vendor={}, Device=0x{:x}\n",
|
/// "Device: Vendor={}, Device=0x{:x}\n",
|
||||||
/// vendor,
|
/// vendor,
|
||||||
/// pdev.device_id()
|
/// pdev.device_id()
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
/// fn probe_device(pdev: &pci::Device<Core>) -> Result {
|
/// fn probe_device(pdev: &pci::Device<Core>) -> Result {
|
||||||
/// let pci_class = pdev.pci_class();
|
/// let pci_class = pdev.pci_class();
|
||||||
/// dev_info!(
|
/// dev_info!(
|
||||||
/// pdev.as_ref(),
|
/// pdev,
|
||||||
/// "Detected PCI class: {}\n",
|
/// "Detected PCI class: {}\n",
|
||||||
/// pci_class
|
/// pci_class
|
||||||
/// );
|
/// );
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ fn probe(pdev: &pci::Device<Core>, info: &Self::IdInfo) -> impl PinInit<Self, Er
|
||||||
pin_init::pin_init_scope(move || {
|
pin_init::pin_init_scope(move || {
|
||||||
let vendor = pdev.vendor_id();
|
let vendor = pdev.vendor_id();
|
||||||
dev_dbg!(
|
dev_dbg!(
|
||||||
pdev.as_ref(),
|
pdev,
|
||||||
"Probe Rust PCI driver sample (PCI ID: {}, 0x{:x}).\n",
|
"Probe Rust PCI driver sample (PCI ID: {}, 0x{:x}).\n",
|
||||||
vendor,
|
vendor,
|
||||||
pdev.device_id()
|
pdev.device_id()
|
||||||
|
|
@ -117,7 +117,7 @@ fn probe(pdev: &pci::Device<Core>, info: &Self::IdInfo) -> impl PinInit<Self, Er
|
||||||
let bar = bar.access(pdev.as_ref())?;
|
let bar = bar.access(pdev.as_ref())?;
|
||||||
|
|
||||||
dev_info!(
|
dev_info!(
|
||||||
pdev.as_ref(),
|
pdev,
|
||||||
"pci-testdev data-match count: {}\n",
|
"pci-testdev data-match count: {}\n",
|
||||||
Self::testdev(info, bar)?
|
Self::testdev(info, bar)?
|
||||||
);
|
);
|
||||||
|
|
@ -139,7 +139,7 @@ fn unbind(pdev: &pci::Device<Core>, this: Pin<&Self>) {
|
||||||
#[pinned_drop]
|
#[pinned_drop]
|
||||||
impl PinnedDrop for SampleDriver {
|
impl PinnedDrop for SampleDriver {
|
||||||
fn drop(self: Pin<&mut Self>) {
|
fn drop(self: Pin<&mut Self>) {
|
||||||
dev_dbg!(self.pdev.as_ref(), "Remove Rust PCI driver sample.\n");
|
dev_dbg!(self.pdev, "Remove Rust PCI driver sample.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user