rust: kernel: fix THIS_MODULE header path in ThisModule doc comment
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
@@ -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
Quoted 10 lines · Yutaro Ohno
The doc comment for
ThisModuleincorrectly states the C header file forTHIS_MODULEasinclude/linux/export.h, while the correct path isinclude/linux/init.h. This is becauseTHIS_MODULEwas moved in commit5b20755b7780("init: moveTHIS_MODULEfrom <linux/export.h> to <linux/init.h>").Update the doc comment for
ThisModuleto reflect the correct header file path forTHIS_MODULE.Signed-off-by Yutaro Ohno <[email protected]>
This should get:
added to it when merged.
Hi Greg, thank you for reviewing.
Quoted 10 lines · Greg KH
Quoted 9 lines · Yutaro Ohno
The doc comment for
ThisModuleincorrectly states the C header file forTHIS_MODULEasinclude/linux/export.h, while the correct path isinclude/linux/init.h. This is becauseTHIS_MODULEwas moved in commit5b20755b7780("init: moveTHIS_MODULEfrom <linux/export.h> to <linux/init.h>").Update the doc comment for
ThisModuleto reflect the correct header file path forTHIS_MODULE.
Quoted 7 lines
Quoted 1 line
Signed-off-by Yutaro Ohno <[email protected]>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
Reviewed-by Greg Kroah-Hartman <[email protected]>
Cheers,
Yutaro