[PATCH 07/35] common: event: Remove unused NEEDS_MANUAL_RELOC code bits

Marek Vasut marek.vasut+renesas at mailbox.org
Wed Sep 6 23:29:47 CEST 2023


The last user of the NEEDS_MANUAL_RELOC has been removed in commit
26af162ac8f8 ("arch: m68k: Implement relocation")
Remove now unused NEEDS_MANUAL_RELOC code.

Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
---
 common/board_r.c |  3 ---
 common/event.c   | 14 --------------
 include/event.h  | 10 ----------
 3 files changed, 27 deletions(-)

diff --git a/common/board_r.c b/common/board_r.c
index 630c104a985..e30963339cf 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -590,9 +590,6 @@ static init_fnc_t init_sequence_r[] = {
 	 */
 #endif
 	initr_reloc_global_data,
-#if IS_ENABLED(CONFIG_NEEDS_MANUAL_RELOC) && CONFIG_IS_ENABLED(EVENT)
-	event_manual_reloc,
-#endif
 #if defined(CONFIG_SYS_INIT_RAM_LOCK) && defined(CONFIG_E500)
 	initr_unlock_ram_in_cache,
 #endif
diff --git a/common/event.c b/common/event.c
index d11b37a1d80..3080d9ed754 100644
--- a/common/event.c
+++ b/common/event.c
@@ -168,20 +168,6 @@ void event_show_spy_list(void)
 	}
 }
 
-#if IS_ENABLED(CONFIG_NEEDS_MANUAL_RELOC)
-int event_manual_reloc(void)
-{
-	struct evspy_info *spy, *end;
-
-	spy = ll_entry_start(struct evspy_info, evspy_info);
-	end = ll_entry_end(struct evspy_info, evspy_info);
-	for (; spy < end; spy++)
-		MANUAL_RELOC(spy->func);
-
-	return 0;
-}
-#endif
-
 #if CONFIG_IS_ENABLED(EVENT_DYNAMIC)
 static void spy_free(struct event_spy *spy)
 {
diff --git a/include/event.h b/include/event.h
index 311df878c4a..be4cefd6ae8 100644
--- a/include/event.h
+++ b/include/event.h
@@ -328,16 +328,6 @@ int event_register(const char *id, enum event_t type, event_handler_t func,
 /** event_show_spy_list( - Show a list of event spies */
 void event_show_spy_list(void);
 
-/**
- * event_manual_reloc() - Relocate event handler pointers
- *
- * Relocate event handler pointers for all static event spies. It is called
- * during the generic board init sequence, after relocation.
- *
- * Return: 0 if OK
- */
-int event_manual_reloc(void);
-
 /**
  * event_type_name() - Get the name of an event type
  *
-- 
2.40.1



More information about the U-Boot mailing list