[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2025020715-subsonic-silenced-36c5@gregkh>
Date: Fri, 7 Feb 2025 13:16:01 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc: Lyude Paul <lyude@...hat.com>, rust-for-linux@...r.kernel.org,
Maíra Canal <mairacanal@...eup.net>,
Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>,
Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
Danilo Krummrich <dakr@...nel.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Wedson Almeida Filho <wedsonaf@...il.com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Xiangfei Ding <dingxiangfei2009@...il.com>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] rust/kernel: Add faux device bindings
On Fri, Feb 07, 2025 at 12:42:41PM +0100, Miguel Ojeda wrote:
> On Fri, Feb 7, 2025 at 1:42 AM Lyude Paul <lyude@...hat.com> wrote:
> >
> > This introduces a crate for working with faux devices in rust, along with
>
> s/crate/module
>
> (also in the module description)
>
> > +//! C header: [`include/linux/device/faux.h`]
> > +use crate::{bindings, device, error::code::*, prelude::*};
>
> Newline between.
>
> > + // SAFETY: self.0 is a valid registered faux_device via our type invariants.
>
> Markdown.
>
> > +// SAFETY: The faux device API is thread-safe
> > +unsafe impl Send for Registration {}
> > +
> > +// SAFETY: The faux device API is thread-safe
> > +unsafe impl Sync for Registration {}
>
> Perhaps some extra notes here would be useful, e.g. is it documented
> to be so? Especially since faux is being added now, it may make sense
> to e.g. take the chance to work on mentioning this on the C side.
How can or should I mention this on the C side?
thanks,
greg k-h
Powered by blists - more mailing lists