mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 4/8] module: retire MODULE_SYMBOL_PREFIX
Date: Tue, 16 Jul 2024 13:58:30 +0200	[thread overview]
Message-ID: <20240716115834.1958413-5-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20240716115834.1958413-1-a.fatoum@pengutronix.de>

We only ever set MODULE_SYMBOL_PREFIX to the empty string and Linux has
dropped the macro as well in the meantime, so just remove the
definition.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 common/module.c        | 4 ++--
 include/linux/export.h | 4 +---
 include/module.h       | 4 ----
 3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/common/module.c b/common/module.c
index b669ec09c99f..120fe4c88183 100644
--- a/common/module.c
+++ b/common/module.c
@@ -187,10 +187,10 @@ static void register_module_cmds(Elf32_Shdr *sechdrs, const char *strtab, unsign
 	sym = (void *)sechdrs[symindex].sh_addr;
 
 	for (i = 0; i < numsyms; i++) {
-		if (strcmp(strtab + sym[i].st_name, MODULE_SYMBOL_PREFIX "__barebox_cmd_start") == 0)
+		if (strcmp(strtab + sym[i].st_name, "__barebox_cmd_start") == 0)
 			cmd_start = (struct command * const *)sym[i].st_value;
 
-		if (strcmp(strtab + sym[i].st_name, MODULE_SYMBOL_PREFIX "__barebox_cmd_end") == 0)
+		if (strcmp(strtab + sym[i].st_name, "__barebox_cmd_end") == 0)
 			cmd_end = (struct command * const *)sym[i].st_value;
 	}
 
diff --git a/include/linux/export.h b/include/linux/export.h
index e8ec826366af..0856704018d2 100644
--- a/include/linux/export.h
+++ b/include/linux/export.h
@@ -4,8 +4,6 @@
 
 #ifndef __ASSEMBLY__
 
-#include <module.h>
-
 #define THIS_MODULE	0
 
 #if defined(CONFIG_MODULES) && !defined(__DISABLE_EXPORTS)
@@ -21,7 +19,7 @@ struct kernel_symbol
 	extern typeof(sym) sym;					\
 	static const char __ustrtab_##sym[]			\
 	__ll_elem(__usymtab_strings)				\
-	= MODULE_SYMBOL_PREFIX #sym;                    	\
+	= #sym;                    	\
 	static const struct kernel_symbol __usymtab_##sym	\
 	__ll_elem(__usymtab)					\
 	= { (unsigned long)&sym, __ustrtab_##sym }
diff --git a/include/module.h b/include/module.h
index 9099e5aeed56..0e81033b20d0 100644
--- a/include/module.h
+++ b/include/module.h
@@ -8,10 +8,6 @@
 #include <linux/export.h>
 #include <linux/list.h>
 
-#ifndef MODULE_SYMBOL_PREFIX
-#define MODULE_SYMBOL_PREFIX
-#endif
-
 #define MODULE_NAME_LEN (64 - sizeof(unsigned long))
 
 /* These are either module local, or the kernel's dummy ones. */
-- 
2.39.2




  parent reply	other threads:[~2024-07-16 11:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-16 11:58 [PATCH 0/8] include: list: remove dependency on linux/kernel.h Ahmad Fatoum
2024-07-16 11:58 ` [PATCH 1/8] regmap-mmio: don't call kfree on non kmalloc allocated buffers Ahmad Fatoum
2024-07-16 11:58 ` [PATCH 2/8] treewide: fix dependency on indirectly included linux/kernel.h Ahmad Fatoum
2024-07-16 11:58 ` [PATCH 3/8] stringlist: make header self-contained Ahmad Fatoum
2024-07-16 11:58 ` Ahmad Fatoum [this message]
2024-07-16 11:58 ` [PATCH 5/8] include: move MODULE_* macro definitions into own header Ahmad Fatoum
2024-07-16 11:58 ` [PATCH 6/8] include: asm-generic/bug: break recursive dependency Ahmad Fatoum
2024-07-16 11:58 ` [PATCH 7/8] include: linux/kernel.h: split off into multiple headers Ahmad Fatoum
2024-07-16 11:58 ` [PATCH 8/8] include: list: replace full kernel.h inclusion with smaller container_of.h Ahmad Fatoum
2024-07-19  6:31 ` [PATCH 0/8] include: list: remove dependency on linux/kernel.h Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240716115834.1958413-5-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox