Skip to contentSkip to conversation

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

PATCH Superseded Yutaro Ohno 2 participants 3 messages Oct 19, 2024 – Oct 21, 2024 Rust

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 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.

---
 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
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 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>").

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

This should get:

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

added to it when merged.

#2 lore raw

Hi Greg, thank you for reviewing.

Quoted 10 lines · Greg KH
Quoted 9 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>").

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

Quoted 7 lines
Quoted 1 line

This should get:

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

added to it when merged.

You're right. I'll add in v2.

Quoted 3 lines

Cheers,
Yutaro