rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rust: pci: fix documentation related to Device instances
@ 2025-06-29  5:57 Rahul Rameshbabu
  2025-06-29  7:14 ` Wren Turkal
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Rahul Rameshbabu @ 2025-06-29  5:57 UTC (permalink / raw)
  To: linux-pci, rust-for-linux
  Cc: Danilo Krummrich, Bjorn Helgaas, Krzysztof Wilczyński,
	Miguel Ojeda, Alex Gaynor, Rahul Rameshbabu

Device instances in the pci crate represent a valid struct pci_dev, not a struct
device.

Signed-off-by: Rahul Rameshbabu <sergeantsagara@protonmail.com>
---

Notes:
    Notes:
    
    I noticed this while working on my HID abstraction work and figured it would be
    a small fixup I could send afterwards.
    
    Link: https://lore.kernel.org/rust-for-linux/20250629045031.92358-2-sergeantsagara@protonmail.com/

 rust/kernel/pci.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/kernel/pci.rs b/rust/kernel/pci.rs
index 6b94fd7a3ce9..af25a3fe92e5 100644
--- a/rust/kernel/pci.rs
+++ b/rust/kernel/pci.rs
@@ -254,7 +254,7 @@ pub trait Driver: Send {
 ///
 /// # Invariants
 ///
-/// A [`Device`] instance represents a valid `struct device` created by the C portion of the kernel.
+/// A [`Device`] instance represents a valid `struct pci_dev` created by the C portion of the kernel.
 #[repr(transparent)]
 pub struct Device<Ctx: device::DeviceContext = device::Normal>(
     Opaque<bindings::pci_dev>,
-- 
2.49.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-07-06  4:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-29  5:57 [PATCH] rust: pci: fix documentation related to Device instances Rahul Rameshbabu
2025-06-29  7:14 ` Wren Turkal
2025-07-05  7:05   ` Rahul Rameshbabu
2025-07-05 11:11   ` Danilo Krummrich
2025-06-29  7:15 ` Wren Turkal
2025-06-29  7:20   ` Wren Turkal
2025-07-05 11:14 ` Danilo Krummrich
2025-07-06  4:02   ` Rahul Rameshbabu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).