Skip to contentSkip to conversation

rust: Fix EXPORT_SYMBOL_RUST_GPL macro to follow guidelines

PATCH In review [email protected] 2 participants 2 messages Dec 11, 2024 Rust

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rust: Fix EXPORT_SYMBOL_RUST_GPL macro to follow guidelines

From: Santosh Mahto <[email protected]>

Warning found by checkpatch.pl script.

---
 rust/exports.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
rust/exports.c +1 -1
index 587f0e776aba..4b34734d77c8 100644
@@ -13,7 +13,7 @@
 
 #include <linux/export.h>
 
-#define EXPORT_SYMBOL_RUST_GPL(sym) extern int sym; EXPORT_SYMBOL_GPL(sym)
+#define EXPORT_SYMBOL_RUST_GPL(sym) EXPORT_SYMBOL_GPL(sym)
 
 #include "exports_core_generated.h"
 #include "exports_helpers_generated.h"
Signature · 1 line
2.25.1
#1 lore raw
Quoted 4 lines · On Wed, Dec 11, 2024 at 7:16 PM <[email protected]> wrote:

From: Santosh Mahto <[email protected]>

Warning found by checkpatch.pl script.

Thanks for the patch!

Which warning? I guess you mean:

WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable

But this is not a normal use of EXPORT_SYMBOL*(), and anyway the patch would break the build since the name is not declared otherwise.

Did you try to build the kernel after the patch with Rust enabled?

Cheers,
Miguel