* [PATCH] rust: fix relative links to kernel header files
@ 2023-10-26 2:09 FUJITA Tomonori
2023-10-26 11:16 ` Miguel Ojeda
0 siblings, 1 reply; 6+ messages in thread
From: FUJITA Tomonori @ 2023-10-26 2:09 UTC (permalink / raw)
To: rust-for-linux
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.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
---
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(-)
diff --git a/rust/kernel/error.rs b/rust/kernel/error.rs
index 032b64543953..5c9cd2e3b03f 100644
--- a/rust/kernel/error.rs
+++ b/rust/kernel/error.rs
@@ -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;
diff --git a/rust/kernel/ioctl.rs b/rust/kernel/ioctl.rs
index c49e1a8d3fd0..5aff1d7f107d 100644
--- a/rust/kernel/ioctl.rs
+++ b/rust/kernel/ioctl.rs
@@ -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)]
diff --git a/rust/kernel/kunit.rs b/rust/kernel/kunit.rs
index 722655b2d62d..f91dea97b47c 100644
--- a/rust/kernel/kunit.rs
+++ b/rust/kernel/kunit.rs
@@ -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>
diff --git a/rust/kernel/print.rs b/rust/kernel/print.rs
index 8009184bf6d7..d3fa37ea3656 100644
--- a/rust/kernel/print.rs
+++ b/rust/kernel/print.rs
@@ -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<'_>) {
diff --git a/rust/kernel/sync/condvar.rs b/rust/kernel/sync/condvar.rs
index ed353399c4e5..7ce8304c5c02 100644
--- a/rust/kernel/sync/condvar.rs
+++ b/rust/kernel/sync/condvar.rs
@@ -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]
diff --git a/rust/kernel/sync/lock/mutex.rs b/rust/kernel/sync/lock/mutex.rs
index 09276fedc091..88b7f9fab2a4 100644
--- a/rust/kernel/sync/lock/mutex.rs
+++ b/rust/kernel/sync/lock/mutex.rs
@@ -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.
diff --git a/rust/kernel/sync/lock/spinlock.rs b/rust/kernel/sync/lock/spinlock.rs
index 91eb2c9e9123..52fc57995576 100644
--- a/rust/kernel/sync/lock/spinlock.rs
+++ b/rust/kernel/sync/lock/spinlock.rs
@@ -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.
diff --git a/rust/kernel/task.rs b/rust/kernel/task.rs
index 7eda15e5f1b3..a10709e185d1 100644
--- a/rust/kernel/task.rs
+++ b/rust/kernel/task.rs
@@ -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};
diff --git a/rust/macros/lib.rs b/rust/macros/lib.rs
index c42105c2ff96..97637223c82f 100644
--- a/rust/macros/lib.rs
+++ b/rust/macros/lib.rs
@@ -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
///
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] rust: fix relative links to kernel header files
2023-10-26 2:09 [PATCH] rust: fix relative links to kernel header files FUJITA Tomonori
@ 2023-10-26 11:16 ` Miguel Ojeda
2023-10-26 11:40 ` [PATCH v2] " FUJITA Tomonori
2023-10-26 14:45 ` [PATCH] " Gary Guo
0 siblings, 2 replies; 6+ messages in thread
From: Miguel Ojeda @ 2023-10-26 11:16 UTC (permalink / raw)
To: FUJITA Tomonori; +Cc: rust-for-linux
On Thu, Oct 26, 2023 at 4:09 AM FUJITA Tomonori
<fujita.tomonori@gmail.com> wrote:
>
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] rust: fix relative links to kernel header files
2023-10-26 11:16 ` Miguel Ojeda
@ 2023-10-26 11:40 ` FUJITA Tomonori
2023-10-27 7:16 ` Greg KH
2023-10-26 14:45 ` [PATCH] " Gary Guo
1 sibling, 1 reply; 6+ messages in thread
From: FUJITA Tomonori @ 2023-10-26 11:40 UTC (permalink / raw)
To: miguel.ojeda.sandonis; +Cc: fujita.tomonori, rust-for-linux
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 <fujita.tomonori@gmail.com>
---
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(-)
diff --git a/rust/kernel/error.rs b/rust/kernel/error.rs
index 032b64543953..5c9cd2e3b03f 100644
--- a/rust/kernel/error.rs
+++ b/rust/kernel/error.rs
@@ -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;
diff --git a/rust/kernel/ioctl.rs b/rust/kernel/ioctl.rs
index c49e1a8d3fd0..5aff1d7f107d 100644
--- a/rust/kernel/ioctl.rs
+++ b/rust/kernel/ioctl.rs
@@ -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)]
diff --git a/rust/kernel/kunit.rs b/rust/kernel/kunit.rs
index 722655b2d62d..f91dea97b47c 100644
--- a/rust/kernel/kunit.rs
+++ b/rust/kernel/kunit.rs
@@ -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>
diff --git a/rust/kernel/print.rs b/rust/kernel/print.rs
index 8009184bf6d7..d3fa37ea3656 100644
--- a/rust/kernel/print.rs
+++ b/rust/kernel/print.rs
@@ -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<'_>) {
diff --git a/rust/kernel/sync/condvar.rs b/rust/kernel/sync/condvar.rs
index ed353399c4e5..7ce8304c5c02 100644
--- a/rust/kernel/sync/condvar.rs
+++ b/rust/kernel/sync/condvar.rs
@@ -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]
diff --git a/rust/kernel/sync/lock/mutex.rs b/rust/kernel/sync/lock/mutex.rs
index 09276fedc091..88b7f9fab2a4 100644
--- a/rust/kernel/sync/lock/mutex.rs
+++ b/rust/kernel/sync/lock/mutex.rs
@@ -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.
diff --git a/rust/kernel/sync/lock/spinlock.rs b/rust/kernel/sync/lock/spinlock.rs
index 91eb2c9e9123..52fc57995576 100644
--- a/rust/kernel/sync/lock/spinlock.rs
+++ b/rust/kernel/sync/lock/spinlock.rs
@@ -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.
diff --git a/rust/kernel/task.rs b/rust/kernel/task.rs
index 7eda15e5f1b3..a10709e185d1 100644
--- a/rust/kernel/task.rs
+++ b/rust/kernel/task.rs
@@ -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};
diff --git a/rust/macros/lib.rs b/rust/macros/lib.rs
index c42105c2ff96..97637223c82f 100644
--- a/rust/macros/lib.rs
+++ b/rust/macros/lib.rs
@@ -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
///
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] rust: fix relative links to kernel header files
2023-10-26 11:16 ` Miguel Ojeda
2023-10-26 11:40 ` [PATCH v2] " FUJITA Tomonori
@ 2023-10-26 14:45 ` Gary Guo
2023-12-15 23:59 ` Miguel Ojeda
1 sibling, 1 reply; 6+ messages in thread
From: Gary Guo @ 2023-10-26 14:45 UTC (permalink / raw)
To: Miguel Ojeda; +Cc: FUJITA Tomonori, rust-for-linux
On Thu, 26 Oct 2023 13:16:05 +0200
Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrote:
> On Thu, Oct 26, 2023 at 4:09 AM FUJITA Tomonori
> <fujita.tomonori@gmail.com> wrote:
> >
> > 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] rust: fix relative links to kernel header files
2023-10-26 11:40 ` [PATCH v2] " FUJITA Tomonori
@ 2023-10-27 7:16 ` Greg KH
0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2023-10-27 7:16 UTC (permalink / raw)
To: FUJITA Tomonori; +Cc: miguel.ojeda.sandonis, rust-for-linux
On Thu, Oct 26, 2023 at 08:40:58PM +0900, FUJITA Tomonori wrote:
> 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 <fujita.tomonori@gmail.com>
> ---
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] rust: fix relative links to kernel header files
2023-10-26 14:45 ` [PATCH] " Gary Guo
@ 2023-12-15 23:59 ` Miguel Ojeda
0 siblings, 0 replies; 6+ messages in thread
From: Miguel Ojeda @ 2023-12-15 23:59 UTC (permalink / raw)
To: Gary Guo; +Cc: FUJITA Tomonori, rust-for-linux
On Thu, Oct 26, 2023 at 4:45 PM Gary Guo <gary@garyguo.net> wrote:
>
> 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/20231215235428.243211-1-ojeda@kernel.org/
Cheers,
Miguel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-12-15 23:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-26 2:09 [PATCH] rust: fix relative links to kernel header files FUJITA Tomonori
2023-10-26 11:16 ` Miguel Ojeda
2023-10-26 11:40 ` [PATCH v2] " FUJITA Tomonori
2023-10-27 7:16 ` Greg KH
2023-10-26 14:45 ` [PATCH] " Gary Guo
2023-12-15 23:59 ` Miguel Ojeda
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).