Skip to contentSkip to conversation

samples: rust: pci: Remove some additional `.as_ref()` for `dev_*` print

PATCH In review Dirk Behme 3 participants 3 messages Feb 2 – Feb 6

Subsystems (3)
lore
Share & tools
lore

Dirk Behme

author
#0 lore raw

PATCH 1/1 samples: rust: pci: Remove some additional `.as_ref()` for `dev_*` print

The commit 600de1c008b2 ("rust: pci: remove redundant .as_ref() for dev_* print") removed .as_ref() for dev_* prints. Nearly at the same time the commit e62e48adf76c ("sample: rust: pci: add tests for config space routines") was merged. Which missed this removal, then.

---

This is based on next-20260130

I don't think its worth a Fixes: tag as both ways work and this is an optimization / clean up only.

 samples/rust/rust_driver_pci.rs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
samples/rust/rust_driver_pci.rs +3 -3
index 4dfb8a6a4707..d3d4a7931deb 100644
@@ -73,19 +73,19 @@ fn config_space(pdev: &pci::Device<Bound>) {
         // TODO: use the register!() macro for defining PCI configuration space registers once it
         // has been move out of nova-core.
         dev_info!(
-            pdev.as_ref(),
+            pdev,
             "pci-testdev config space read8 rev ID: {:x}\n",
             config.read8(0x8)
         );
 
         dev_info!(
-            pdev.as_ref(),
+            pdev,
             "pci-testdev config space read16 vendor ID: {:x}\n",
             config.read16(0)
         );
 
         dev_info!(
-            pdev.as_ref(),
+            pdev,
             "pci-testdev config space read32 BAR 0: {:x}\n",
             config.read32(0x10)
         );
Signature · 1 line
2.34.1
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Dirk Behme

The commit 600de1c008b2 ("rust: pci: remove redundant .as_ref() for dev_* print") removed .as_ref() for dev_* prints. Nearly at the same time the commit e62e48adf76c ("sample: rust: pci: add tests for config space routines") was merged. Which missed this removal, then.

I noticed it as well but you beat me to it. :)

maintainer
#2 lore raw
In reply to Dirk Behme
Quoted 6 lines · Dirk Behme

The commit 600de1c008b2 ("rust: pci: remove redundant .as_ref() for dev_* print") removed .as_ref() for dev_* prints. Nearly at the same time the commit e62e48adf76c ("sample: rust: pci: add tests for config space routines") was merged. Which missed this removal, then.

Applied to driver-core-testing, thanks!