rust: fix relative links to kernel header files
Subsystems (4)
PATCH 1/1 rust: fix relative links to kernel header files
Relative links to kernel header files are broken due to the move of the output path? Looks like some of links has been broken before that.
--- rust/kernel/error.rs | 2 +- rust/kernel/ioctl.rs | 2 +- rust/kernel/kunit.rs | 2 +- rust/kernel/print.rs | 8 ++++---- rust/kernel/sync/condvar.rs | 2 +- rust/kernel/sync/lock/mutex.rs | 2 +- rust/kernel/sync/lock/spinlock.rs | 2 +- rust/kernel/task.rs | 2 +- rust/macros/lib.rs | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-)
rust/kernel/error.rs +1 -1
@@ -2,7 +2,7 @@//! Kernel errors. //! -//! C header: [`include/uapi/asm-generic/errno-base.h`](../../../include/uapi/asm-generic/errno-base.h) +//! C header: [`include/uapi/asm-generic/errno-base.h`](../../../../../../include/uapi/asm-generic/errno-base.h) use crate ::str::CStr ;
rust/kernel/ioctl.rs +1 -1
@@ -2,7 +2,7 @@//! ioctl() number definitions //! -//! C header: [`include/asm-generic/ioctl.h`](../../../../include/asm-generic/ioctl.h) +//! C header: [`include/asm-generic/ioctl.h`](../../../../../../include/asm-generic/ioctl.h) #![allow(non_snake_case)]
rust/kernel/kunit.rs +1 -1
@@ -2,7 +2,7 @@//! KUnit-based macros for Rust unit tests. //! -//! C header: [`include/kunit/test.h`](../../../../../include/kunit/test.h) +//! C header: [`include/kunit/test.h`](../../../../../../include/kunit/test.h) //! //! Reference: <https://docs.kernel.org/dev-tools/kunit/index.html>
rust/kernel/print.rs +4 -4
@@ -2,7 +2,7 @@//! Printing facilities. //! -//! C header: [`include/linux/printk.h`](../../../../include/linux/printk.h) +//! C header: [`include/linux/printk.h`](../../../../../../include/linux/printk.h) //! //! Reference: <https://www.kernel.org/doc/html/latest/core-api/printk-basics.html>
@@ -48,7 +48,7 @@ pub mod format_strings {/// The format string is always the same for a given level, i.e. for a /// given `prefix`, which are the kernel's `KERN_*` constants. /// -/// [`_printk`]: ../../../../include/linux/printk.h +/// [`_printk`]: ../../../../../../include/linux/printk.h const fn generate (is_cont:bool , prefix: &[u8 ;3 ]) -> [u8 ;LENGTH ] {// Ensure the `KERN_*` macros are what we expect. assert! (prefix[0 ] ==b'\x01' );
@@ -97,7 +97,7 @@ pub mod format_strings {/// The format string must be one of the ones in [`format_strings`], and /// the module name must be null-terminated. /// -/// [`_printk`]: ../../../../include/linux/_printk.h +/// [`_printk`]: ../../../../../../include/linux/_printk.h #[doc(hidden)] #[cfg_attr(not( CONFIG_PRINTK ), allow(unused_variables))] pub unsafe fn call_printk(
@@ -120,7 +120,7 @@ pub unsafe fn call_printk(/// /// Public but hidden since it should only be used from public macros. /// -/// [`_printk`]: ../../../../include/linux/printk.h +/// [`_printk`]: ../../../../../../include/linux/printk.h #[doc(hidden)] #[cfg_attr(not( CONFIG_PRINTK ), allow(unused_variables))] pub fn call_printk_cont (args: fmt::Arguments <'_>) {
rust/kernel/sync/condvar.rs +1 -1
@@ -69,7 +69,7 @@ macro_rules! new_condvar {/// } /// ``` /// -/// [`struct wait_queue_head`]: ../../../include/linux/wait.h +/// [`struct wait_queue_head`]: ../../../../../../include/linux/wait.h #[pin_data] pub struct CondVar { #[pin]
rust/kernel/sync/lock/mutex.rs +1 -1
@@ -84,7 +84,7 @@ macro_rules! new_mutex {/// } /// ``` /// -/// [`struct mutex`]: ../../../../include/linux/mutex.h +/// [`struct mutex`]: ../../../../../../../../include/linux/mutex.h pub type Mutex <T > =super ::Lock <T ,MutexBackend >;/// A kernel `struct mutex` lock backend.
rust/kernel/sync/lock/spinlock.rs +1 -1
@@ -82,7 +82,7 @@ macro_rules! new_spinlock {/// } /// ``` /// -/// [`spinlock_t`]: ../../../../include/linux/spinlock.h +/// [`spinlock_t`]: ../../../../../../../../include/linux/spinlock.h pub type SpinLock <T > =super ::Lock <T ,SpinLockBackend >;/// A kernel `spinlock_t` lock backend.
rust/kernel/task.rs +1 -1
@@ -2,7 +2,7 @@//! Tasks (threads and processes). //! -//! C header: [`include/linux/sched.h`](../../../../include/linux/sched.h). +//! C header: [`include/linux/sched.h`](../../../../../../include/linux/sched.h). use crate ::{bindings, types::Opaque };use core::{marker::PhantomData , ops::Deref , ptr};
rust/macros/lib.rs +1 -1
@@ -20,7 +20,7 @@/// The `type` argument should be a type which implements the [`Module`] /// trait. Also accepts various forms of kernel metadata. /// -/// C header: [`include/linux/moduleparam.h`](../../../include/linux/moduleparam.h) +/// C header: [`include/linux/moduleparam.h`](../../../../../include/linux/moduleparam.h) /// /// [`Module`]: ../kernel/trait.Module.html ///
Signature · 1 line
2.34.1
Quoted 3 lines · FUJITA Tomonori
Relative links to kernel header files are broken due to the move of the output path? Looks like some of links has been broken before that.
Yeah, we wanted to clean these up when these paths stabilized -- thanks for this!
Please look up when that happened and add a Fixes: tag (i.e. instead of asking in the commit message).
(In addition, "some of links has" -> "some of the links have", in case you happen to reuse that bit in the message).
Cheers,
Miguel
PATCH v2 1/1 rust: fix relative links to kernel header files
Relative links to kernel header files are broken due to the move of the output path. Some of the links have been broken before that.
--- rust/kernel/error.rs | 2 +- rust/kernel/ioctl.rs | 2 +- rust/kernel/kunit.rs | 2 +- rust/kernel/print.rs | 8 ++++---- rust/kernel/sync/condvar.rs | 2 +- rust/kernel/sync/lock/mutex.rs | 2 +- rust/kernel/sync/lock/spinlock.rs | 2 +- rust/kernel/task.rs | 2 +- rust/macros/lib.rs | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-)
rust/kernel/error.rs +1 -1
@@ -2,7 +2,7 @@//! Kernel errors. //! -//! C header: [`include/uapi/asm-generic/errno-base.h`](../../../include/uapi/asm-generic/errno-base.h) +//! C header: [`include/uapi/asm-generic/errno-base.h`](../../../../../../include/uapi/asm-generic/errno-base.h) use crate ::str::CStr ;
rust/kernel/ioctl.rs +1 -1
@@ -2,7 +2,7 @@//! ioctl() number definitions //! -//! C header: [`include/asm-generic/ioctl.h`](../../../../include/asm-generic/ioctl.h) +//! C header: [`include/asm-generic/ioctl.h`](../../../../../../include/asm-generic/ioctl.h) #![allow(non_snake_case)]
rust/kernel/kunit.rs +1 -1
@@ -2,7 +2,7 @@//! KUnit-based macros for Rust unit tests. //! -//! C header: [`include/kunit/test.h`](../../../../../include/kunit/test.h) +//! C header: [`include/kunit/test.h`](../../../../../../include/kunit/test.h) //! //! Reference: <https://docs.kernel.org/dev-tools/kunit/index.html>
rust/kernel/print.rs +4 -4
@@ -2,7 +2,7 @@//! Printing facilities. //! -//! C header: [`include/linux/printk.h`](../../../../include/linux/printk.h) +//! C header: [`include/linux/printk.h`](../../../../../../include/linux/printk.h) //! //! Reference: <https://www.kernel.org/doc/html/latest/core-api/printk-basics.html>
@@ -48,7 +48,7 @@ pub mod format_strings {/// The format string is always the same for a given level, i.e. for a /// given `prefix`, which are the kernel's `KERN_*` constants. /// -/// [`_printk`]: ../../../../include/linux/printk.h +/// [`_printk`]: ../../../../../../include/linux/printk.h const fn generate (is_cont:bool , prefix: &[u8 ;3 ]) -> [u8 ;LENGTH ] {// Ensure the `KERN_*` macros are what we expect. assert! (prefix[0 ] ==b'\x01' );
@@ -97,7 +97,7 @@ pub mod format_strings {/// The format string must be one of the ones in [`format_strings`], and /// the module name must be null-terminated. /// -/// [`_printk`]: ../../../../include/linux/_printk.h +/// [`_printk`]: ../../../../../../include/linux/_printk.h #[doc(hidden)] #[cfg_attr(not( CONFIG_PRINTK ), allow(unused_variables))] pub unsafe fn call_printk(
@@ -120,7 +120,7 @@ pub unsafe fn call_printk(/// /// Public but hidden since it should only be used from public macros. /// -/// [`_printk`]: ../../../../include/linux/printk.h +/// [`_printk`]: ../../../../../../include/linux/printk.h #[doc(hidden)] #[cfg_attr(not( CONFIG_PRINTK ), allow(unused_variables))] pub fn call_printk_cont (args: fmt::Arguments <'_>) {
rust/kernel/sync/condvar.rs +1 -1
@@ -69,7 +69,7 @@ macro_rules! new_condvar {/// } /// ``` /// -/// [`struct wait_queue_head`]: ../../../include/linux/wait.h +/// [`struct wait_queue_head`]: ../../../../../../include/linux/wait.h #[pin_data] pub struct CondVar { #[pin]
rust/kernel/sync/lock/mutex.rs +1 -1
@@ -84,7 +84,7 @@ macro_rules! new_mutex {/// } /// ``` /// -/// [`struct mutex`]: ../../../../include/linux/mutex.h +/// [`struct mutex`]: ../../../../../../../../include/linux/mutex.h pub type Mutex <T > =super ::Lock <T ,MutexBackend >;/// A kernel `struct mutex` lock backend.
rust/kernel/sync/lock/spinlock.rs +1 -1
@@ -82,7 +82,7 @@ macro_rules! new_spinlock {/// } /// ``` /// -/// [`spinlock_t`]: ../../../../include/linux/spinlock.h +/// [`spinlock_t`]: ../../../../../../../../include/linux/spinlock.h pub type SpinLock <T > =super ::Lock <T ,SpinLockBackend >;/// A kernel `spinlock_t` lock backend.
rust/kernel/task.rs +1 -1
@@ -2,7 +2,7 @@//! Tasks (threads and processes). //! -//! C header: [`include/linux/sched.h`](../../../../include/linux/sched.h). +//! C header: [`include/linux/sched.h`](../../../../../../include/linux/sched.h). use crate ::{bindings, types::Opaque };use core::{marker::PhantomData , ops::Deref , ptr};
rust/macros/lib.rs +1 -1
@@ -20,7 +20,7 @@/// The `type` argument should be a type which implements the [`Module`] /// trait. Also accepts various forms of kernel metadata. /// -/// C header: [`include/linux/moduleparam.h`](../../../include/linux/moduleparam.h) +/// C header: [`include/linux/moduleparam.h`](../../../../../include/linux/moduleparam.h) /// /// [`Module`]: ../kernel/trait.Module.html ///
Signature · 1 line
2.34.1
Quoted 6 lines · FUJITA Tomonori
Relative links to kernel header files are broken due to the move of the output path. Some of the links have been broken before that.
Fixes 48fadf440075 ("docs: Move rustdoc output, cross-reference it")Signed-off-by FUJITA Tomonori <[email protected]>---
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree.
You are receiving this message because of the following common error(s) as indicated below:
- You have marked a patch with a "Fixes:" tag for a commit that is in an older released kernel, yet you do not have a cc: stable line in the signed-off-by area at all, which means that the patch will not be applied to any older kernel releases. To properly fix this, please follow the documented rules in the Documentation/process/stable-kernel-rules.rst file for how to resolve this.
If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers.
thanks,
greg k-h's patch email bot
Gary Guo
maintainerQuoted 8 lines · On Thu, 26 Oct 2023 13:16:05 +0200 Miguel Ojeda…
Quoted 3 lines · FUJITA Tomonori
Relative links to kernel header files are broken due to the move of the output path? Looks like some of links has been broken before that.
Yeah, we wanted to clean these up when these paths stabilized -- thanks for this!
Would it be possible to use source-relative paths and then have them fixed-up later when generating the docs? It's quite ugly and not very maintainable to count the number of dotdots.
Best,
Gary
Quoted 4 lines · Gary Guo
Would it be possible to use source-relative paths and then have them fixed-up later when generating the docs? It's quite ugly and not very maintainable to count the number of dotdots.
Yeah, I agree. One possibility would be:
https://lore.kernel.org/rust-for-linux/[email protected]/
Cheers,
Miguel