rust: replace <linux/module.h> with <linux/export.h> in rust/exports.c
PATCH 1/1 rust: replace <linux/module.h> with <linux/export.h> in rust/exports.c
<linux/export.h> is the right header to include for using EXPORT_SYMBOL_GPL. <linux/module.h> includes much more bloat.
Signed-off-by Masahiro Yamada <[email protected]>
---
rust/exports.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
rust/exports.c +1 -1
@@ -11,7 +11,7 @@* accidentally exposed. */ -#include <linux/module.h> +#include <linux/export.h> #define EXPORT_SYMBOL_RUST_GPL (sym) extern int sym; EXPORT_SYMBOL_GPL(sym)
Signature · 1 line
2.40.1
Quoted 5 lines · Masahiro Yamada
<
linux/export.h> is the right header to include for usingEXPORT_SYMBOL_GPL. <linux/module.h> includes much more bloat.Signed-off-by Masahiro Yamada <[email protected]>
Good catch, thanks!
Cheers,
Miguel
rust/exports.c line 15
Quoted 11 lines · Masahiro Yamada
<
linux/export.h> is the right header to include for usingEXPORT_SYMBOL_GPL. <linux/module.h> includes much more bloat.Signed-off-by Masahiro Yamada <[email protected]>---
[...]rust/exports.c +1
-1-#include <linux/module.h> +#include <linux/export.h>
I'll use this in my crates patch. Regardless, LGTM.
Reviewed-by Martin Rodriguez Reboredo <[email protected]>
Miguel Ojeda
AppliedQuoted 5 lines · Masahiro Yamada
<
linux/export.h> is the right header to include for usingEXPORT_SYMBOL_GPL. <linux/module.h> includes much more bloat.Signed-off-by Masahiro Yamada <[email protected]>
Applied to rust-next.
Thanks everyone!
Cheers,
Miguel