rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] rust: io: fix broken intra-doc link to missing `flags` module
@ 2025-07-22  8:54 Miguel Ojeda
  2025-07-22  8:55 ` [PATCH 2/2] rust: io: fix broken intra-doc links to `platform::Device` Miguel Ojeda
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Miguel Ojeda @ 2025-07-22  8:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J. Wysocki, Danilo Krummrich,
	Miguel Ojeda, Alex Gaynor
  Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Trevor Gross, rust-for-linux,
	linux-kernel, patches

There is no `mod flags` in this case, unlike others. Instead, they are
associated constants for the `Flags` type.

Thus reword the sentence to fix the broken intra-doc link, providing
an example of constant and linking to it to clarify which ones we are
referring to.

Fixes: 493fc33ec252 ("rust: io: add resource abstraction")
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
 rust/kernel/io/resource.rs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/rust/kernel/io/resource.rs b/rust/kernel/io/resource.rs
index 1d5f367a6e8a..bea3ee0ed87b 100644
--- a/rust/kernel/io/resource.rs
+++ b/rust/kernel/io/resource.rs
@@ -177,7 +177,8 @@ unsafe impl Sync for Resource {}
 ///
 /// They can be combined with the operators `|`, `&`, and `!`.
 ///
-/// Values can be used from the [`flags`] module.
+/// Values can be used from the associated constants such as
+/// [`Flags::IORESOURCE_IO`].
 #[derive(Clone, Copy, PartialEq)]
 pub struct Flags(c_ulong);
 

base-commit: 696b2a6ce9487ae278fd239658ca2714cd211e8e
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] rust: io: fix broken intra-doc links to `platform::Device`
  2025-07-22  8:54 [PATCH 1/2] rust: io: fix broken intra-doc link to missing `flags` module Miguel Ojeda
@ 2025-07-22  8:55 ` Miguel Ojeda
  2025-07-22  9:20 ` [PATCH 1/2] rust: io: fix broken intra-doc link to missing `flags` module Miguel Ojeda
  2025-07-22  9:29 ` Danilo Krummrich
  2 siblings, 0 replies; 4+ messages in thread
From: Miguel Ojeda @ 2025-07-22  8:55 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Rafael J. Wysocki, Danilo Krummrich,
	Miguel Ojeda, Alex Gaynor
  Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Trevor Gross, rust-for-linux,
	linux-kernel, patches

`platform` is not accessible from here.

Thus fix the intra-doc links by qualifying the paths a bit more.

Fixes: 1d0d4b28513b ("rust: io: mem: add a generic iomem abstraction")
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
 rust/kernel/io/mem.rs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/rust/kernel/io/mem.rs b/rust/kernel/io/mem.rs
index cc9feb2897d8..6f99510bfc3a 100644
--- a/rust/kernel/io/mem.rs
+++ b/rust/kernel/io/mem.rs
@@ -40,8 +40,8 @@ pub(crate) unsafe fn new(device: &'a Device<Bound>, resource: &'a Resource) -> S
     ///
     /// # Examples
     ///
-    /// The following example uses a [`platform::Device`] for illustration
-    /// purposes.
+    /// The following example uses a [`kernel::platform::Device`] for
+    /// illustration purposes.
     ///
     /// ```no_run
     /// use kernel::{bindings, c_str, platform, of, device::Core};
@@ -98,8 +98,8 @@ pub fn iomap_exclusive_sized<const SIZE: usize>(
     ///
     /// # Examples
     ///
-    /// The following example uses a [`platform::Device`] for illustration
-    /// purposes.
+    /// The following example uses a [`kernel::platform::Device`] for
+    /// illustration purposes.
     ///
     /// ```no_run
     /// use kernel::{bindings, c_str, platform, of, device::Core};
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] rust: io: fix broken intra-doc link to missing `flags` module
  2025-07-22  8:54 [PATCH 1/2] rust: io: fix broken intra-doc link to missing `flags` module Miguel Ojeda
  2025-07-22  8:55 ` [PATCH 2/2] rust: io: fix broken intra-doc links to `platform::Device` Miguel Ojeda
@ 2025-07-22  9:20 ` Miguel Ojeda
  2025-07-22  9:29 ` Danilo Krummrich
  2 siblings, 0 replies; 4+ messages in thread
From: Miguel Ojeda @ 2025-07-22  9:20 UTC (permalink / raw)
  To: Miguel Ojeda
  Cc: Greg Kroah-Hartman, Rafael J. Wysocki, Danilo Krummrich,
	Alex Gaynor, Boqun Feng, Gary Guo, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
	rust-for-linux, linux-kernel, patches

On Tue, Jul 22, 2025 at 10:55 AM Miguel Ojeda <ojeda@kernel.org> wrote:
>
> There is no `mod flags` in this case, unlike others. Instead, they are
> associated constants for the `Flags` type.
>
> Thus reword the sentence to fix the broken intra-doc link, providing
> an example of constant and linking to it to clarify which ones we are
> referring to.
>
> Fixes: 493fc33ec252 ("rust: io: add resource abstraction")
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
> ---

I should have mentioned that, as usual, please feel free to rebase
these if preferred (I think you don't in that tree, but
nevertheless...)

These two are meant to clean -next (and rust.docs.kernel.org, which I
build with WERROR so far).

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] rust: io: fix broken intra-doc link to missing `flags` module
  2025-07-22  8:54 [PATCH 1/2] rust: io: fix broken intra-doc link to missing `flags` module Miguel Ojeda
  2025-07-22  8:55 ` [PATCH 2/2] rust: io: fix broken intra-doc links to `platform::Device` Miguel Ojeda
  2025-07-22  9:20 ` [PATCH 1/2] rust: io: fix broken intra-doc link to missing `flags` module Miguel Ojeda
@ 2025-07-22  9:29 ` Danilo Krummrich
  2 siblings, 0 replies; 4+ messages in thread
From: Danilo Krummrich @ 2025-07-22  9:29 UTC (permalink / raw)
  To: Miguel Ojeda
  Cc: Greg Kroah-Hartman, Rafael J. Wysocki, Alex Gaynor, Boqun Feng,
	Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
	Alice Ryhl, Trevor Gross, rust-for-linux, linux-kernel, patches

On Tue Jul 22, 2025 at 10:54 AM CEST, Miguel Ojeda wrote:
> There is no `mod flags` in this case, unlike others. Instead, they are
> associated constants for the `Flags` type.
>
> Thus reword the sentence to fix the broken intra-doc link, providing
> an example of constant and linking to it to clarify which ones we are
> referring to.
>
> Fixes: 493fc33ec252 ("rust: io: add resource abstraction")
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

Thanks for catching this and the other documentation warning.

Applied to driver-core-testing, thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-07-22  9:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-22  8:54 [PATCH 1/2] rust: io: fix broken intra-doc link to missing `flags` module Miguel Ojeda
2025-07-22  8:55 ` [PATCH 2/2] rust: io: fix broken intra-doc links to `platform::Device` Miguel Ojeda
2025-07-22  9:20 ` [PATCH 1/2] rust: io: fix broken intra-doc link to missing `flags` module Miguel Ojeda
2025-07-22  9:29 ` Danilo Krummrich

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).