Skip to contentSkip to conversation

rust: print: fix broken `_printk` Rustdoc link

PATCH Applied Younes Akhouayri 3 participants 4 messages Jul 17 – Aug 3 Rust

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rust: print: fix broken `_printk` Rustdoc link

The Rustdoc link for _printk points to include/linux/_printk.h, which does not exist. Point it to include/linux/printk.h, where _printk is declared.

Fixes 247b365dc8dc ("rust: add `kernel` crate")
---
 rust/kernel/print.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
rust/kernel/print.rs +1 -1
index 6fd84389a858..0d62beeedca5 100644
@@ -99,7 +99,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`]: srctree/include/linux/_printk.h
+/// [`_printk`]: srctree/include/linux/printk.h
 #[doc(hidden)]
 #[cfg_attr(not(CONFIG_PRINTK), allow(unused_variables))]
 pub unsafe fn call_printk(

---
base-commit: 7059bdf4f04a3e14f4fafb3ac35fdca913e3e21a
change-id: 20260717-docs-printk-rustdoc-link-a6645b2873ba

Best regards,

Signature · 1 line
Younes Akhouayri <[email protected]>
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 30 lines · On Fri, 17 Jul 2026 13:44:06 +0200 Younes Akhouayri via B4 Relay…

From: Younes Akhouayri <[email protected]>

The Rustdoc link for _printk points to include/linux/_printk.h, which does not exist. Point it to include/linux/printk.h, where _printk is declared.

Fixes 247b365dc8dc ("rust: add `kernel` crate")
---
 rust/kernel/print.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
rust/kernel/print.rs +1 -2
index 6fd84389a858..0d62beeedca5 100644
@@ -99,7 +99,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`]: srctree/include/linux/_printk.h
+/// [`_printk`]: srctree/include/linux/printk.h
 #[doc(hidden)]
 #[cfg_attr(not(CONFIG_PRINTK), allow(unused_variables))]
 pub unsafe fn call_printk(
 
---

base-commit: 7059bdf4f04a3e14f4fafb3ac35fdca913e3e21a
change-id: 20260717-docs-printk-rustdoc-link-a6645b2873ba

Quoted 5 lines

Best regards,

Signature · 1 line
Younes Akhouayri <[email protected]>

Thanks!

#2 lore raw
In reply to Younes Akhouayri
Quoted 9 lines · On Fri, Jul 17, 2026 at 1:44 PM Younes Akhouayri via B4 Relay…

From: Younes Akhouayri <[email protected]>

The Rustdoc link for _printk points to include/linux/_printk.h, which does not exist. Point it to include/linux/printk.h, where _printk is declared.

Fixes 247b365dc8dc ("rust: add `kernel` crate")

Looks good to me, thanks for reporting it and fixing it!

(Normally it would be Closes:, but there are two issues in the same one, so we use Link: for that instead.)

Finally, given it is doc(hidden), I will skip Cc: stable@ -- if the stable team auto-selects it, it is fine.

Cheers,
Miguel

Applied
#3 lore raw
In reply to Younes Akhouayri
Quoted 9 lines · On Fri, Jul 17, 2026 at 1:44 PM Younes Akhouayri via B4 Relay…

From: Younes Akhouayri <[email protected]>

The Rustdoc link for _printk points to include/linux/_printk.h, which does not exist. Point it to include/linux/printk.h, where _printk is declared.

Fixes 247b365dc8dc ("rust: add `kernel` crate")

Applied to rust-next -- thanks everyone!

Cheers,
Miguel