Skip to contentSkip to conversation

rust: kernel: fix THIS_MODULE header path in ThisModule doc comment

PATCH Applied Yutaro Ohno 2 participants 3 messages Oct 21, 2024 – Oct 22, 2024 Rust

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 rust: kernel: fix THIS_MODULE header path in ThisModule doc comment

The doc comment for ThisModule incorrectly states the C header file for THIS_MODULE as include/linux/export.h, while the correct path is include/linux/init.h. This is because THIS_MODULE was moved in commit 5b20755b7780 ("init: move THIS_MODULE from <linux/export.h> to <linux/init.h>").

Update the doc comment for ThisModule to reflect the correct header file path for THIS_MODULE.

Fixes 5b20755b7780 ("init: move THIS_MODULE from <linux/export.h> to <linux/init.h>")

---

v2:
- Add Fixes tag.

---
 rust/kernel/lib.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
rust/kernel/lib.rs +1 -1
index b5f4b3ce6b48..032c9089e686 100644
@@ -83,7 +83,7 @@ pub trait Module: Sized + Sync + Send {
 
 /// Equivalent to `THIS_MODULE` in the C API.
 ///
-/// C header: [`include/linux/export.h`](srctree/include/linux/export.h)
+/// C header: [`include/linux/init.h`](srctree/include/linux/init.h)
 pub struct ThisModule(*mut bindings::module);
 
 // SAFETY: `THIS_MODULE` may be used from all threads within a module.
Signature · 1 line
2.47.0
Applied
#1 lore raw
Quoted 7 lines · Yutaro Ohno

The doc comment for ThisModule incorrectly states the C header file for THIS_MODULE as include/linux/export.h, while the correct path is include/linux/init.h. This is because THIS_MODULE was moved in commit 5b20755b7780 ("init: move THIS_MODULE from <linux/export.h> to <linux/init.h>").

Quoted 6 lines

Update the doc comment for ThisModule to reflect the correct header file path for THIS_MODULE.

Fixes 5b20755b7780 ("init: move THIS_MODULE from <linux/export.h> to <linux/init.h>")

Applied to rust-next -- thanks!

Thanks Yutaro -- there is usually no need to send a new version just for picking up tags, maintainers will do it for you :)

(Of course, if you needed to send a new version for another reason, then you should pick them up).

Cheers,
Miguel

#2 lore raw
Quoted 5 lines · Miguel Ojeda

Thanks Yutaro -- there is usually no need to send a new version just for picking up tags, maintainers will do it for you :)

(Of course, if you needed to send a new version for another reason, then you should pick them up).

Understood. Thanks for letting me know, Miguel!

Cheers,
Yutaro