* [PATCH] samples: rust: pci: Remove some additional `.as_ref()` for `dev_*` print
@ 2026-02-02 6:40 Dirk Behme
2026-02-02 8:01 ` Alexandre Courbot
2026-02-06 19:26 ` Danilo Krummrich
0 siblings, 2 replies; 3+ messages in thread
From: Dirk Behme @ 2026-02-02 6:40 UTC (permalink / raw)
To: rust-for-linux, gary, dakr
Cc: dirk.behme, ojeda, linux-pci, kwilczynski, bhelgaas
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.
Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
---
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(-)
diff --git a/samples/rust/rust_driver_pci.rs b/samples/rust/rust_driver_pci.rs
index 4dfb8a6a4707..d3d4a7931deb 100644
--- a/samples/rust/rust_driver_pci.rs
+++ b/samples/rust/rust_driver_pci.rs
@@ -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)
);
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] samples: rust: pci: Remove some additional `.as_ref()` for `dev_*` print
2026-02-02 6:40 [PATCH] samples: rust: pci: Remove some additional `.as_ref()` for `dev_*` print Dirk Behme
@ 2026-02-02 8:01 ` Alexandre Courbot
2026-02-06 19:26 ` Danilo Krummrich
1 sibling, 0 replies; 3+ messages in thread
From: Alexandre Courbot @ 2026-02-02 8:01 UTC (permalink / raw)
To: Dirk Behme
Cc: rust-for-linux, gary, dakr, ojeda, linux-pci, kwilczynski,
bhelgaas
On Mon Feb 2, 2026 at 3:40 PM JST, Dirk Behme wrote:
> 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.
>
> Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
I noticed it as well but you beat me to it. :)
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] samples: rust: pci: Remove some additional `.as_ref()` for `dev_*` print
2026-02-02 6:40 [PATCH] samples: rust: pci: Remove some additional `.as_ref()` for `dev_*` print Dirk Behme
2026-02-02 8:01 ` Alexandre Courbot
@ 2026-02-06 19:26 ` Danilo Krummrich
1 sibling, 0 replies; 3+ messages in thread
From: Danilo Krummrich @ 2026-02-06 19:26 UTC (permalink / raw)
To: Dirk Behme; +Cc: rust-for-linux, gary, ojeda, linux-pci, kwilczynski, bhelgaas
On Mon Feb 2, 2026 at 7:40 AM CET, Dirk Behme wrote:
> 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.
>
> Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
Applied to driver-core-testing, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-02-06 19:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-02 6:40 [PATCH] samples: rust: pci: Remove some additional `.as_ref()` for `dev_*` print Dirk Behme
2026-02-02 8:01 ` Alexandre Courbot
2026-02-06 19:26 ` Danilo Krummrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox