rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miguel Ojeda <ojeda@kernel.org>
To: FUJITA Tomonori <fujita.tomonori@gmail.com>,
	Miguel Ojeda <ojeda@kernel.org>,
	Alex Gaynor <alex.gaynor@gmail.com>
Cc: "Trevor Gross" <tmgross@umich.edu>,
	netdev@vger.kernel.org, rust-for-linux@vger.kernel.org,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Danilo Krummrich" <dakr@kernel.org>,
	linux-kernel@vger.kernel.org, patches@lists.linux.dev
Subject: [PATCH 2/3] rust: net: phy: make example buildable
Date: Mon, 10 Nov 2025 13:22:22 +0100	[thread overview]
Message-ID: <20251110122223.1677654-2-ojeda@kernel.org> (raw)
In-Reply-To: <20251110122223.1677654-1-ojeda@kernel.org>

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@kernel.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


  reply	other threads:[~2025-11-10 12:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-10 12:22 [PATCH 1/3] rust: net: phy: fix example's references to `C{22,45}` Miguel Ojeda
2025-11-10 12:22 ` Miguel Ojeda [this message]
2025-11-10 23:34   ` [PATCH 2/3] rust: net: phy: make example buildable FUJITA Tomonori
2025-11-11 21:02     ` Miguel Ojeda
2025-11-11 22:55       ` FUJITA Tomonori
2025-11-10 12:22 ` [PATCH 3/3] rust: net: phy: follow usual comment conventions Miguel Ojeda
2025-11-10 23:37   ` FUJITA Tomonori
2025-11-10 15:50 ` [PATCH 1/3] rust: net: phy: fix example's references to `C{22,45}` Andrew Lunn
2025-11-10 23:24 ` FUJITA Tomonori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251110122223.1677654-2-ojeda@kernel.org \
    --to=ojeda@kernel.org \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=fujita.tomonori@gmail.com \
    --cc=gary@garyguo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).