[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z_zt4Cfmn_gWnMot@pollux>
Date: Mon, 14 Apr 2025 13:13:36 +0200
From: Danilo Krummrich <dakr@...nel.org>
To: Benno Lossin <benno.lossin@...ton.me>
Cc: bhelgaas@...gle.com, kwilczynski@...nel.org, gregkh@...uxfoundation.org,
rafael@...nel.org, abdiel.janulgue@...il.com, ojeda@...nel.org,
alex.gaynor@...il.com, boqun.feng@...il.com, gary@...yguo.net,
bjorn3_gh@...tonmail.com, a.hindborg@...nel.org,
aliceryhl@...gle.com, tmgross@...ch.edu,
daniel.almeida@...labora.com, robin.murphy@....com,
linux-pci@...r.kernel.org, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 6/9] rust: device: implement Bound device context
On Mon, Apr 14, 2025 at 10:44:35AM +0000, Benno Lossin wrote:
> On Sun Apr 13, 2025 at 7:37 PM CEST, Danilo Krummrich wrote:
>
> > + $device,
> > + $crate::device::Bound => $crate::device::Normal
>
> IIUC, all "devices" (so eg `pci::Device`) will use this macro, right? In
> that case, I think we can document this behavior a bit better, possibly
> on the `DeviceContext` context trait and/or on the different type
> states. So on `Core` we could say "The `Core` context is a supercontext
> of the [`Bound`] context and devices also expose operations available in
> that context while in `Core`." and similarly on `Bound` with `Normal`.
Fully agree, I absolutely want to have this documented. I wasn't yet sure where
I want to document this though. device::DeviceContext seems to be a reasonable
place.
Besides that, I think I also want to rename it to device::Context, not sure if
it's worth though.
I will send a subsequent patch for the documentation on DeviceContext.
Powered by blists - more mailing lists