[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b0a0438d-e088-44f0-8f63-f3632a4c6b90@lunn.ch>
Date: Fri, 16 Aug 2024 02:40:12 +0200
From: Andrew Lunn <andrew@...n.ch>
To: FUJITA Tomonori <fujita.tomonori@...il.com>
Cc: netdev@...r.kernel.org, rust-for-linux@...r.kernel.org,
	tmgross@...ch.edu, miguel.ojeda.sandonis@...il.com,
	benno.lossin@...ton.me, aliceryhl@...gle.com
Subject: Re: [PATCH net-next v3 2/6] rust: net::phy support probe callback
> +    /// # Safety
> +    ///
> +    /// `phydev` must be passed by the corresponding callback in `phy_driver`.
> +    unsafe extern "C" fn probe_callback(phydev: *mut bindings::phy_device) -> core::ffi::c_int {
> +        from_result(|| {
> +            // SAFETY: This callback is called only in contexts
> +            // where we can exclusively access to `phy_device` because
> +            // it's not published yet, so the accessors on `Device` are okay
> +            // to call.
Minor English nitpick. Its is normally 'have access to'. Or you can
drop the 'to'.
Otherwise
Reviewed-by: Andrew Lunn <andrew@...n.ch>
    Andrew
Powered by blists - more mailing lists
 
