rust: io: fix broken intra-doc link to missing `flags` module
Subsystems (2)
Miguel Ojeda
maintainerPATCH 1/2 rust: io: fix broken intra-doc link to missing `flags` module
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.
--- rust/kernel/io/resource.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
rust/kernel/io/resource.rs +2 -1
@@ -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
Signature · 1 line
2.50.1
Miguel Ojeda
maintainerPATCH 2/2 rust: io: fix broken intra-doc links to `platform::Device`
platform is not accessible from here.
Thus fix the intra-doc links by qualifying the paths a bit more.
--- rust/kernel/io/mem.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
rust/kernel/io/mem.rs +4 -4
@@ -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};
Signature · 1 line
2.50.1
Quoted 11 lines · Miguel Ojeda
There is no
mod flagsin this case, unlike others. Instead, they are associated constants for theFlagstype.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 <[email protected]>---
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
Danilo Krummrich
maintainerQuoted 9 lines · Miguel Ojeda
There is no
mod flagsin this case, unlike others. Instead, they are associated constants for theFlagstype.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 <[email protected]>
Thanks for catching this and the other documentation warning.
Applied to driver-core-testing, thanks!