rust: kernel: fix THIS_MODULE header path in ThisModule doc comment
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.
---
v2:
- Add Fixes tag.
--- 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
Miguel Ojeda
AppliedQuoted 7 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>").
Quoted 6 lines
Update the doc comment for
ThisModuleto reflect the correct header file path forTHIS_MODULE.Fixes 5b20755b7780 ("init: move THIS_MODULE from <linux/export.h> to <linux/init.h>")Signed-off-by Yutaro Ohno <[email protected]>Reviewed-by Greg Kroah-Hartman <[email protected]>
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
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