* [PATCH] rust: replace <linux/module.h> with <linux/export.h> in rust/exports.c
@ 2023-11-24 14:26 Masahiro Yamada
2023-11-24 14:36 ` Miguel Ojeda
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Masahiro Yamada @ 2023-11-24 14:26 UTC (permalink / raw)
To: rust-for-linux
Cc: linux-kernel, Masahiro Yamada, Alex Gaynor, Alice Ryhl,
Andreas Hindborg, Benno Lossin, Björn Roy Baron, Boqun Feng,
Gary Guo, Miguel Ojeda, Wedson Almeida Filho
<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 <masahiroy@kernel.org>
---
rust/exports.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rust/exports.c b/rust/exports.c
index 83e2a7070cae..3803c21d1403 100644
--- a/rust/exports.c
+++ b/rust/exports.c
@@ -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)
--
2.40.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rust: replace <linux/module.h> with <linux/export.h> in rust/exports.c
2023-11-24 14:26 [PATCH] rust: replace <linux/module.h> with <linux/export.h> in rust/exports.c Masahiro Yamada
@ 2023-11-24 14:36 ` Miguel Ojeda
2023-11-24 14:54 ` Martin Rodriguez Reboredo
2023-12-13 18:43 ` Miguel Ojeda
2 siblings, 0 replies; 4+ messages in thread
From: Miguel Ojeda @ 2023-11-24 14:36 UTC (permalink / raw)
To: Masahiro Yamada
Cc: rust-for-linux, linux-kernel, Alex Gaynor, Alice Ryhl,
Andreas Hindborg, Benno Lossin, Björn Roy Baron, Boqun Feng,
Gary Guo, Miguel Ojeda, Wedson Almeida Filho
On Fri, Nov 24, 2023 at 3:26 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> <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 <masahiroy@kernel.org>
Good catch, thanks!
Cheers,
Miguel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rust: replace <linux/module.h> with <linux/export.h> in rust/exports.c
2023-11-24 14:26 [PATCH] rust: replace <linux/module.h> with <linux/export.h> in rust/exports.c Masahiro Yamada
2023-11-24 14:36 ` Miguel Ojeda
@ 2023-11-24 14:54 ` Martin Rodriguez Reboredo
2023-12-13 18:43 ` Miguel Ojeda
2 siblings, 0 replies; 4+ messages in thread
From: Martin Rodriguez Reboredo @ 2023-11-24 14:54 UTC (permalink / raw)
To: Masahiro Yamada, rust-for-linux
Cc: linux-kernel, Alex Gaynor, Alice Ryhl, Andreas Hindborg,
Benno Lossin, Björn Roy Baron, Boqun Feng, Gary Guo,
Miguel Ojeda, Wedson Almeida Filho
On 11/24/23 11:26, Masahiro Yamada wrote:
> <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 <masahiroy@kernel.org>
> ---
> [...]
>
> -#include <linux/module.h>
> +#include <linux/export.h>
>
> [...]
I'll use this in my crates patch. Regardless, LGTM.
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] rust: replace <linux/module.h> with <linux/export.h> in rust/exports.c
2023-11-24 14:26 [PATCH] rust: replace <linux/module.h> with <linux/export.h> in rust/exports.c Masahiro Yamada
2023-11-24 14:36 ` Miguel Ojeda
2023-11-24 14:54 ` Martin Rodriguez Reboredo
@ 2023-12-13 18:43 ` Miguel Ojeda
2 siblings, 0 replies; 4+ messages in thread
From: Miguel Ojeda @ 2023-12-13 18:43 UTC (permalink / raw)
To: Masahiro Yamada
Cc: rust-for-linux, linux-kernel, Alex Gaynor, Alice Ryhl,
Andreas Hindborg, Benno Lossin, Björn Roy Baron, Boqun Feng,
Gary Guo, Miguel Ojeda, Wedson Almeida Filho
On Fri, Nov 24, 2023 at 3:26 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> <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 <masahiroy@kernel.org>
Applied to `rust-next`.
Thanks everyone!
Cheers,
Miguel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-12-13 18:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-24 14:26 [PATCH] rust: replace <linux/module.h> with <linux/export.h> in rust/exports.c Masahiro Yamada
2023-11-24 14:36 ` Miguel Ojeda
2023-11-24 14:54 ` Martin Rodriguez Reboredo
2023-12-13 18:43 ` Miguel Ojeda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®