aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/module.h
diff options
context:
space:
mode:
authorLeon Romanovsky <leon@kernel.org>2025-02-25 04:04:46 -0500
committerLeon Romanovsky <leon@kernel.org>2025-02-25 04:04:46 -0500
commit230804a89319a76c6e653caadc98a870877548cc (patch)
tree27113d25cebb6a5c868e7c35a29809921223f86f /include/linux/module.h
parentRDMA/hfi1: Remove unused one_qsfp_write (diff)
parentnet/mlx5: Change POOL_NEXT_SIZE define value and make it global (diff)
downloadwireguard-linux-230804a89319a76c6e653caadc98a870877548cc.tar.xz
wireguard-linux-230804a89319a76c6e653caadc98a870877548cc.zip
Merge branch 'mlx5-next' into wip/leon-for-next
This is merge of shared branch between RDMA and net-next trees. * mlx5-next: (550 commits) net/mlx5: Change POOL_NEXT_SIZE define value and make it global net/mlx5: Add new health syndrome error and crr bit offset Linux 6.14-rc3 ... Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to '')
-rw-r--r--include/linux/module.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/module.h b/include/linux/module.h
index 23792d5d7b74..30e5b19bafa9 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -306,7 +306,10 @@ extern int modules_disabled; /* for sysctl */
/* Get/put a kernel symbol (calls must be symmetric) */
void *__symbol_get(const char *symbol);
void *__symbol_get_gpl(const char *symbol);
-#define symbol_get(x) ((typeof(&x))(__symbol_get(__stringify(x))))
+#define symbol_get(x) ({ \
+ static const char __notrim[] \
+ __used __section(".no_trim_symbol") = __stringify(x); \
+ (typeof(&x))(__symbol_get(__stringify(x))); })
/* modules using other modules: kdb wants to see this. */
struct module_use {