Re: [PATCH 2/3] rust: net: phy: make example buildable
From: FUJITA Tomonori
Date: Mon Nov 10 2025 - 18:34:38 EST
On Mon, 10 Nov 2025 13:22:22 +0100
Miguel Ojeda <ojeda@xxxxxxxxxx> 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@xxxxxxxxxx>
> ---
> 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?