[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251111.083413.2270464617525340597.fujita.tomonori@gmail.com>
Date: Tue, 11 Nov 2025 08:34:13 +0900 (JST)
From: FUJITA Tomonori <fujita.tomonori@...il.com>
To: ojeda@...nel.org
Cc: fujita.tomonori@...il.com, alex.gaynor@...il.com, tmgross@...ch.edu,
netdev@...r.kernel.org, rust-for-linux@...r.kernel.org,
boqun.feng@...il.com, gary@...yguo.net, bjorn3_gh@...tonmail.com,
lossin@...nel.org, a.hindborg@...nel.org, aliceryhl@...gle.com,
dakr@...nel.org, linux-kernel@...r.kernel.org, patches@...ts.linux.dev
Subject: Re: [PATCH 2/3] rust: net: phy: make example buildable
On Mon, 10 Nov 2025 13:22:22 +0100
Miguel Ojeda <ojeda@...nel.org> wrote:
> This example can easily be made buildable, thus do so.
>
> Making examples buildable prevents issues like the one fixed in the
> previous commit.
>
> Signed-off-by: Miguel Ojeda <ojeda@...nel.org>
> ---
> rust/kernel/net/phy/reg.rs | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/rust/kernel/net/phy/reg.rs b/rust/kernel/net/phy/reg.rs
> index 4e8b58711bae..165bbff93e53 100644
> --- a/rust/kernel/net/phy/reg.rs
> +++ b/rust/kernel/net/phy/reg.rs
> @@ -25,7 +25,16 @@ pub trait Sealed {}
> ///
> /// # Examples
> ///
> -/// ```ignore
> +/// ```
> +/// # use kernel::net::phy::{
> +/// # self,
> +/// # Device,
> +/// # reg::{
> +/// # C22,
> +/// # C45,
> +/// # Mmd, //
> +/// # }, //
> +/// # };
> /// fn link_change_notify(dev: &mut Device) {
> /// // read C22 BMCR register
> /// dev.read(C22::BMCR);
I think that some code begin lines with # for use lines in a "#
Examples" section, while others do not. Which style is recommended?
Powered by blists - more mailing lists