[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251110122223.1677654-2-ojeda@kernel.org>
Date: Mon, 10 Nov 2025 13:22:22 +0100
From: Miguel Ojeda <ojeda@...nel.org>
To: FUJITA Tomonori <fujita.tomonori@...il.com>,
Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>
Cc: Trevor Gross <tmgross@...ch.edu>,
netdev@...r.kernel.org,
rust-for-linux@...r.kernel.org,
Boqun Feng <boqun.feng@...il.com>,
Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <lossin@...nel.org>,
Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>,
Danilo Krummrich <dakr@...nel.org>,
linux-kernel@...r.kernel.org,
patches@...ts.linux.dev
Subject: [PATCH 2/3] rust: net: phy: make example buildable
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);
--
2.51.2
Powered by blists - more mailing lists