linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] rust: pci: fix documentation related to Device instances
@ 2025-07-06  4:00 Rahul Rameshbabu
  2025-07-07 12:44 ` Danilo Krummrich
  0 siblings, 1 reply; 2+ messages in thread
From: Rahul Rameshbabu @ 2025-07-06  4:00 UTC (permalink / raw)
  To: rust-for-linux, linux-pci
  Cc: dakr, alex.gaynor, bhelgaas, kwilczynski, ojeda, wt,
	Rahul Rameshbabu

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

Fixes: 7b948a2af6b5 ("rust: pci: fix unrestricted &mut pci::Device")
Signed-off-by: Rahul Rameshbabu <sergeantsagara@protonmail.com>
---

Notes:
    Changes:
    
      v1->v2:
        * Added Fixes: git trailer
        * Fixed warnings from ./scripts/checkpatch.pl

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

diff --git a/rust/kernel/pci.rs b/rust/kernel/pci.rs
index 6b94fd7a3ce9..b991fb440882 100644
--- a/rust/kernel/pci.rs
+++ b/rust/kernel/pci.rs
@@ -254,7 +254,8 @@ 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>,

base-commit: 2009a2d5696944d85c34d75e691a6f3884e787c0
-- 
2.47.2



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

* Re: [PATCH v2] rust: pci: fix documentation related to Device instances
  2025-07-06  4:00 [PATCH v2] rust: pci: fix documentation related to Device instances Rahul Rameshbabu
@ 2025-07-07 12:44 ` Danilo Krummrich
  0 siblings, 0 replies; 2+ messages in thread
From: Danilo Krummrich @ 2025-07-07 12:44 UTC (permalink / raw)
  To: Rahul Rameshbabu
  Cc: rust-for-linux, linux-pci, alex.gaynor, bhelgaas, kwilczynski,
	ojeda, wt

On Sun, Jul 06, 2025 at 04:00:32AM +0000, Rahul Rameshbabu wrote:
> Device instances in the pci crate represent a valid struct pci_dev, not a
> struct device.
> 
> Fixes: 7b948a2af6b5 ("rust: pci: fix unrestricted &mut pci::Device")
> Signed-off-by: Rahul Rameshbabu <sergeantsagara@protonmail.com>

Applied to driver-core-testing, thanks!

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

end of thread, other threads:[~2025-07-07 12:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-06  4:00 [PATCH v2] rust: pci: fix documentation related to Device instances Rahul Rameshbabu
2025-07-07 12:44 ` Danilo Krummrich

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).