Skip to contentSkip to conversation

rust: replace <linux/module.h> with <linux/export.h> in rust/exports.c

PATCH Applied Masahiro Yamada 3 participants 4 messages Nov 24, 2023 – Dec 13, 2023 Rust

lore
Share & tools
lore
#0 lore raw

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.

---

 rust/exports.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
rust/exports.c +1 -1
index 83e2a7070cae..3803c21d1403 100644
@@ -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
Reviewed-by on v1 1/1
#2 lore raw
In reply to Masahiro Yamada

rust/exports.c line 15

Quoted 11 lines · Masahiro Yamada

<linux/export.h> is the right header to include for using EXPORT_SYMBOL_GPL. <linux/module.h> includes much more bloat.

---
[...]

rust/exports.c +1 -1
-#include <linux/module.h>
+#include <linux/export.h>
 
[...]

I'll use this in my crates patch. Regardless, LGTM.