* [PATCH 0/3] Fix broken `srctree/` links and warn about them
@ 2025-07-30 13:07 Miguel Ojeda
2025-07-30 13:07 ` [PATCH 1/3] rust: block: fix `srctree/` links Miguel Ojeda
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Miguel Ojeda @ 2025-07-30 13:07 UTC (permalink / raw)
To: Miguel Ojeda, Alex Gaynor, Andreas Hindborg, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
Alice Ryhl, Trevor Gross, Danilo Krummrich, rust-for-linux,
linux-block, dri-devel, linux-kernel, patches
This fixes a handful of broken links and introduces a warning to
prevent them from happening in the future.
Relatedly, we could also perhaps check the other side of the links, but
perhaps there are cases we want to customize. Alternatively, we could
also in the future introduce custom syntax for these that avoids
repetition or a fancier preprocessing step.
Miguel Ojeda (3):
rust: block: fix `srctree/` links
rust: drm: fix `srctree/` links
rust: warn if `srctree/` links do not exist
rust/Makefile | 6 ++++++
rust/kernel/block/mq/gen_disk.rs | 2 +-
rust/kernel/drm/device.rs | 2 +-
rust/kernel/drm/driver.rs | 2 +-
rust/kernel/drm/file.rs | 2 +-
rust/kernel/drm/gem/mod.rs | 2 +-
rust/kernel/drm/ioctl.rs | 2 +-
7 files changed, 12 insertions(+), 6 deletions(-)
--
2.50.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] rust: block: fix `srctree/` links
2025-07-30 13:07 [PATCH 0/3] Fix broken `srctree/` links and warn about them Miguel Ojeda
@ 2025-07-30 13:07 ` Miguel Ojeda
2025-07-30 13:07 ` [PATCH 2/3] rust: drm: " Miguel Ojeda
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Miguel Ojeda @ 2025-07-30 13:07 UTC (permalink / raw)
To: Miguel Ojeda, Alex Gaynor, Andreas Hindborg, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
Alice Ryhl, Trevor Gross, Danilo Krummrich, rust-for-linux,
linux-block, dri-devel, linux-kernel, patches
This `srctree/` link pointed to a file with an underscore, but the header
used a dash instead.
Thus fix it.
This cleans a future warning that will check our `srctree/` links.
Fixes: 3253aba3408a ("rust: block: introduce `kernel::block::mq` module")
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
rust/kernel/block/mq/gen_disk.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rust/kernel/block/mq/gen_disk.rs b/rust/kernel/block/mq/gen_disk.rs
index cd54cd64ea88..e1af0fa302a3 100644
--- a/rust/kernel/block/mq/gen_disk.rs
+++ b/rust/kernel/block/mq/gen_disk.rs
@@ -3,7 +3,7 @@
//! Generic disk abstraction.
//!
//! C header: [`include/linux/blkdev.h`](srctree/include/linux/blkdev.h)
-//! C header: [`include/linux/blk_mq.h`](srctree/include/linux/blk_mq.h)
+//! C header: [`include/linux/blk-mq.h`](srctree/include/linux/blk-mq.h)
use crate::block::mq::{raw_writer::RawWriter, Operations, TagSet};
use crate::{bindings, error::from_err_ptr, error::Result, sync::Arc};
--
2.50.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] rust: drm: fix `srctree/` links
2025-07-30 13:07 [PATCH 0/3] Fix broken `srctree/` links and warn about them Miguel Ojeda
2025-07-30 13:07 ` [PATCH 1/3] rust: block: fix `srctree/` links Miguel Ojeda
@ 2025-07-30 13:07 ` Miguel Ojeda
2025-07-30 13:19 ` Danilo Krummrich
2025-07-30 13:07 ` [PATCH 3/3] rust: warn if `srctree/` links do not exist Miguel Ojeda
2025-07-30 13:36 ` [PATCH 0/3] Fix broken `srctree/` links and warn about them Daniel Almeida
3 siblings, 1 reply; 7+ messages in thread
From: Miguel Ojeda @ 2025-07-30 13:07 UTC (permalink / raw)
To: Miguel Ojeda, Alex Gaynor, Andreas Hindborg, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
Alice Ryhl, Trevor Gross, Danilo Krummrich, rust-for-linux,
linux-block, dri-devel, linux-kernel, patches
These `srctree/` links pointed inside `linux/`, but they are directly
under `drm/`.
Thus fix them.
This cleans a future warning that will check our `srctree/` links.
Fixes: a98a73be9ee9 ("rust: drm: file: Add File abstraction")
Fixes: c284d3e42338 ("rust: drm: gem: Add GEM object abstraction")
Fixes: 07c9016085f9 ("rust: drm: add driver abstractions")
Fixes: 1e4b8896c0f3 ("rust: drm: add device abstraction")
Fixes: 9a69570682b1 ("rust: drm: ioctl: Add DRM ioctl abstraction")
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
rust/kernel/drm/device.rs | 2 +-
rust/kernel/drm/driver.rs | 2 +-
rust/kernel/drm/file.rs | 2 +-
rust/kernel/drm/gem/mod.rs | 2 +-
rust/kernel/drm/ioctl.rs | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/rust/kernel/drm/device.rs b/rust/kernel/drm/device.rs
index e598c4274f29..306aaa783bbc 100644
--- a/rust/kernel/drm/device.rs
+++ b/rust/kernel/drm/device.rs
@@ -2,7 +2,7 @@
//! DRM device.
//!
-//! C header: [`include/linux/drm/drm_device.h`](srctree/include/linux/drm/drm_device.h)
+//! C header: [`include/drm/drm_device.h`](srctree/include/drm/drm_device.h)
use crate::{
bindings, device, drm,
diff --git a/rust/kernel/drm/driver.rs b/rust/kernel/drm/driver.rs
index acb638086131..6381cf57fb42 100644
--- a/rust/kernel/drm/driver.rs
+++ b/rust/kernel/drm/driver.rs
@@ -2,7 +2,7 @@
//! DRM driver core.
//!
-//! C header: [`include/linux/drm/drm_drv.h`](srctree/include/linux/drm/drm_drv.h)
+//! C header: [`include/drm/drm_drv.h`](srctree/include/drm/drm_drv.h)
use crate::{
bindings, device,
diff --git a/rust/kernel/drm/file.rs b/rust/kernel/drm/file.rs
index b9527705e551..f736cade7eb4 100644
--- a/rust/kernel/drm/file.rs
+++ b/rust/kernel/drm/file.rs
@@ -2,7 +2,7 @@
//! DRM File objects.
//!
-//! C header: [`include/linux/drm/drm_file.h`](srctree/include/linux/drm/drm_file.h)
+//! C header: [`include/drm/drm_file.h`](srctree/include/drm/drm_file.h)
use crate::{bindings, drm, error::Result, prelude::*, types::Opaque};
use core::marker::PhantomData;
diff --git a/rust/kernel/drm/gem/mod.rs b/rust/kernel/drm/gem/mod.rs
index 6f914ae0a5aa..95fb562cc968 100644
--- a/rust/kernel/drm/gem/mod.rs
+++ b/rust/kernel/drm/gem/mod.rs
@@ -2,7 +2,7 @@
//! DRM GEM API
//!
-//! C header: [`include/linux/drm/drm_gem.h`](srctree/include/linux/drm/drm_gem.h)
+//! C header: [`include/drm/drm_gem.h`](srctree/include/drm/drm_gem.h)
use crate::{
alloc::flags::*,
diff --git a/rust/kernel/drm/ioctl.rs b/rust/kernel/drm/ioctl.rs
index 445639404fb7..a19bc8eca029 100644
--- a/rust/kernel/drm/ioctl.rs
+++ b/rust/kernel/drm/ioctl.rs
@@ -2,7 +2,7 @@
//! DRM IOCTL definitions.
//!
-//! C header: [`include/linux/drm/drm_ioctl.h`](srctree/include/linux/drm/drm_ioctl.h)
+//! C header: [`include/drm/drm_ioctl.h`](srctree/include/drm/drm_ioctl.h)
use crate::ioctl;
--
2.50.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] rust: warn if `srctree/` links do not exist
2025-07-30 13:07 [PATCH 0/3] Fix broken `srctree/` links and warn about them Miguel Ojeda
2025-07-30 13:07 ` [PATCH 1/3] rust: block: fix `srctree/` links Miguel Ojeda
2025-07-30 13:07 ` [PATCH 2/3] rust: drm: " Miguel Ojeda
@ 2025-07-30 13:07 ` Miguel Ojeda
2025-07-30 13:13 ` Onur Özkan
2025-07-30 13:36 ` [PATCH 0/3] Fix broken `srctree/` links and warn about them Daniel Almeida
3 siblings, 1 reply; 7+ messages in thread
From: Miguel Ojeda @ 2025-07-30 13:07 UTC (permalink / raw)
To: Miguel Ojeda, Alex Gaynor, Andreas Hindborg, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
Alice Ryhl, Trevor Gross, Danilo Krummrich, rust-for-linux,
linux-block, dri-devel, linux-kernel, patches, Onur Özkan
`srctree/` links may point to nonexistent files, e.g. due to renames
that missed to update the files or simply because of typos.
Since they can be easily checked for validity, do so and print a warning
in the file does not exist.
This found the following cases already in-tree:
warning: srctree/ link to include/linux/blk_mq.h does not exist
warning: srctree/ link to include/linux/drm/drm_gem.h does not exist
warning: srctree/ link to include/linux/drm/drm_drv.h does not exist
warning: srctree/ link to include/linux/drm/drm_ioctl.h does not exist
warning: srctree/ link to include/linux/drm/drm_file.h does not exist
warning: srctree/ link to include/linux/drm/drm_device.h does not exist
Inspired-by: "Onur Özkan" <work@onurozkan.dev>
Link: https://lore.kernel.org/rust-for-linux/CANiq72=xCYA7z7_rxpzzKkkhJs6m7L_xEaLMuArVn3ZAcyeHdA@mail.gmail.com/
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
rust/Makefile | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/rust/Makefile b/rust/Makefile
index 4e675d210dd8..a27503028216 100644
--- a/rust/Makefile
+++ b/rust/Makefile
@@ -93,6 +93,12 @@ quiet_cmd_rustdoc = RUSTDOC $(if $(rustdoc_host),H, ) $<
# and then retouch the generated files.
rustdoc: rustdoc-core rustdoc-macros rustdoc-compiler_builtins \
rustdoc-kernel rustdoc-pin_init
+ $(Q)grep -Ehro '<a href="srctree/([^"]+)"' $(rustdoc_output) | \
+ cut -d'"' -f2 | cut -d/ -f2- | while read f; do \
+ if [ ! -e "$(srctree)/$$f" ]; then \
+ echo "warning: srctree/ link to $$f does not exist"; \
+ fi \
+ done
$(Q)cp $(srctree)/Documentation/images/logo.svg $(rustdoc_output)/static.files/
$(Q)cp $(srctree)/Documentation/images/COPYING-logo $(rustdoc_output)/static.files/
$(Q)find $(rustdoc_output) -name '*.html' -type f -print0 | xargs -0 sed -Ei \
--
2.50.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] rust: warn if `srctree/` links do not exist
2025-07-30 13:07 ` [PATCH 3/3] rust: warn if `srctree/` links do not exist Miguel Ojeda
@ 2025-07-30 13:13 ` Onur Özkan
0 siblings, 0 replies; 7+ messages in thread
From: Onur Özkan @ 2025-07-30 13:13 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Alex Gaynor, Andreas Hindborg, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Boqun Feng,
Gary Guo, Björn Roy Baron, Benno Lossin, Alice Ryhl,
Trevor Gross, Danilo Krummrich, rust-for-linux, linux-block,
dri-devel, linux-kernel, patches
On Wed, 30 Jul 2025 15:07:16 +0200
Miguel Ojeda <ojeda@kernel.org> wrote:
> `srctree/` links may point to nonexistent files, e.g. due to renames
> that missed to update the files or simply because of typos.
>
> Since they can be easily checked for validity, do so and print a
> warning in the file does not exist.
>
> This found the following cases already in-tree:
>
> warning: srctree/ link to include/linux/blk_mq.h does not exist
> warning: srctree/ link to include/linux/drm/drm_gem.h does not
> exist warning: srctree/ link to include/linux/drm/drm_drv.h does not
> exist warning: srctree/ link to include/linux/drm/drm_ioctl.h does
> not exist warning: srctree/ link to include/linux/drm/drm_file.h does
> not exist warning: srctree/ link to include/linux/drm/drm_device.h
> does not exist
>
> Inspired-by: "Onur Özkan" <work@onurozkan.dev>
> Link:
> https://lore.kernel.org/rust-for-linux/CANiq72=xCYA7z7_rxpzzKkkhJs6m7L_xEaLMuArVn3ZAcyeHdA@mail.gmail.com/
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org> ---
> rust/Makefile | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/rust/Makefile b/rust/Makefile
> index 4e675d210dd8..a27503028216 100644
> --- a/rust/Makefile
> +++ b/rust/Makefile
> @@ -93,6 +93,12 @@ quiet_cmd_rustdoc = RUSTDOC $(if
> $(rustdoc_host),H, ) $< # and then retouch the generated files.
> rustdoc: rustdoc-core rustdoc-macros rustdoc-compiler_builtins \
> rustdoc-kernel rustdoc-pin_init
> + $(Q)grep -Ehro '<a href="srctree/([^"]+)"' $(rustdoc_output)
> | \
> + cut -d'"' -f2 | cut -d/ -f2- | while read f; do \
> + if [ ! -e "$(srctree)/$$f" ]; then \
> + echo "warning: srctree/ link to $$f
> does not exist"; \
> + fi \
> + done
> $(Q)cp $(srctree)/Documentation/images/logo.svg
> $(rustdoc_output)/static.files/ $(Q)cp
> $(srctree)/Documentation/images/COPYING-logo
> $(rustdoc_output)/static.files/ $(Q)find $(rustdoc_output) -name
> '*.html' -type f -print0 | xargs -0 sed -Ei \
That's awesome! This would help a lot. :)
Reviewed-by: Onur Özkan <work@onurozkan.dev>
--
Regards,
Onur
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] rust: drm: fix `srctree/` links
2025-07-30 13:07 ` [PATCH 2/3] rust: drm: " Miguel Ojeda
@ 2025-07-30 13:19 ` Danilo Krummrich
0 siblings, 0 replies; 7+ messages in thread
From: Danilo Krummrich @ 2025-07-30 13:19 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Alex Gaynor, Andreas Hindborg, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Boqun Feng,
Gary Guo, Björn Roy Baron, Benno Lossin, Alice Ryhl,
Trevor Gross, rust-for-linux, linux-block, dri-devel,
linux-kernel, patches
On 7/30/25 3:07 PM, Miguel Ojeda wrote:
> These `srctree/` links pointed inside `linux/`, but they are directly
> under `drm/`.
>
> Thus fix them.
>
> This cleans a future warning that will check our `srctree/` links.
>
> Fixes: a98a73be9ee9 ("rust: drm: file: Add File abstraction")
> Fixes: c284d3e42338 ("rust: drm: gem: Add GEM object abstraction")
> Fixes: 07c9016085f9 ("rust: drm: add driver abstractions")
> Fixes: 1e4b8896c0f3 ("rust: drm: add device abstraction")
> Fixes: 9a69570682b1 ("rust: drm: ioctl: Add DRM ioctl abstraction")
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Good catch!
Acked-by: Danilo Krummrich <dakr@kernel.org>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] Fix broken `srctree/` links and warn about them
2025-07-30 13:07 [PATCH 0/3] Fix broken `srctree/` links and warn about them Miguel Ojeda
` (2 preceding siblings ...)
2025-07-30 13:07 ` [PATCH 3/3] rust: warn if `srctree/` links do not exist Miguel Ojeda
@ 2025-07-30 13:36 ` Daniel Almeida
3 siblings, 0 replies; 7+ messages in thread
From: Daniel Almeida @ 2025-07-30 13:36 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Alex Gaynor, Andreas Hindborg, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Boqun Feng,
Gary Guo, Björn Roy Baron, Benno Lossin, Alice Ryhl,
Trevor Gross, Danilo Krummrich, rust-for-linux, linux-block,
dri-devel, linux-kernel, patches
Hi Miguel, this is indeed nice!
> On 30 Jul 2025, at 10:07, Miguel Ojeda <ojeda@kernel.org> wrote:
>
> This fixes a handful of broken links and introduces a warning to
> prevent them from happening in the future.
>
> Relatedly, we could also perhaps check the other side of the links, but
> perhaps there are cases we want to customize. Alternatively, we could
> also in the future introduce custom syntax for these that avoids
> repetition or a fancier preprocessing step.
>
> Miguel Ojeda (3):
> rust: block: fix `srctree/` links
> rust: drm: fix `srctree/` links
> rust: warn if `srctree/` links do not exist
>
> rust/Makefile | 6 ++++++
> rust/kernel/block/mq/gen_disk.rs | 2 +-
> rust/kernel/drm/device.rs | 2 +-
> rust/kernel/drm/driver.rs | 2 +-
> rust/kernel/drm/file.rs | 2 +-
> rust/kernel/drm/gem/mod.rs | 2 +-
> rust/kernel/drm/ioctl.rs | 2 +-
> 7 files changed, 12 insertions(+), 6 deletions(-)
>
> —
> 2.50.1
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Patch 3 alone indeed produces the following warnings:
warning: srctree/ link to include/linux/blk_mq.h does not exist
warning: srctree/ link to include/linux/drm/drm_device.h does not exist
warning: srctree/ link to include/linux/drm/drm_ioctl.h does not exist
warning: srctree/ link to include/linux/drm/drm_file.h does not exist
warning: srctree/ link to include/linux/drm/drm_drv.h does not exist
warning: srctree/ link to include/linux/drm/drm_gem.h does not exist
So you can add my Tested-by for that one.
Cheers,
— Daniel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-07-30 13:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-30 13:07 [PATCH 0/3] Fix broken `srctree/` links and warn about them Miguel Ojeda
2025-07-30 13:07 ` [PATCH 1/3] rust: block: fix `srctree/` links Miguel Ojeda
2025-07-30 13:07 ` [PATCH 2/3] rust: drm: " Miguel Ojeda
2025-07-30 13:19 ` Danilo Krummrich
2025-07-30 13:07 ` [PATCH 3/3] rust: warn if `srctree/` links do not exist Miguel Ojeda
2025-07-30 13:13 ` Onur Özkan
2025-07-30 13:36 ` [PATCH 0/3] Fix broken `srctree/` links and warn about them Daniel Almeida
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).