[PATCH 06/18] bootm: Drop arguments from boot_selected_os()

Simon Glass sjg at chromium.org
Mon Dec 4 01:26:22 CET 2023


The argc and argv parameters are not used now, so drop them.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 boot/bootm.c    | 6 ++----
 boot/bootm_os.c | 4 ++--
 include/bootm.h | 4 ++--
 3 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/boot/bootm.c b/boot/bootm.c
index c343f313e80a..d2448f6306dc 100644
--- a/boot/bootm.c
+++ b/boot/bootm.c
@@ -1117,8 +1117,7 @@ int do_bootm_states(struct cmd_tbl *cmdtp, int flag, int argc,
 	if (!ret && (states & BOOTM_STATE_OS_FAKE_GO)) {
 		char *cmd_list = env_get("fakegocmd");
 
-		ret = boot_selected_os(argc, argv, BOOTM_STATE_OS_FAKE_GO,
-				images, boot_fn);
+		ret = boot_selected_os(BOOTM_STATE_OS_FAKE_GO, images, boot_fn);
 		if (!ret && cmd_list)
 			ret = run_command_list(cmd_list, -1, flag);
 	}
@@ -1132,8 +1131,7 @@ int do_bootm_states(struct cmd_tbl *cmdtp, int flag, int argc,
 
 	/* Now run the OS! We hope this doesn't return */
 	if (!ret && (states & BOOTM_STATE_OS_GO))
-		ret = boot_selected_os(argc, argv, BOOTM_STATE_OS_GO,
-				images, boot_fn);
+		ret = boot_selected_os(BOOTM_STATE_OS_GO, images, boot_fn);
 
 	/* Deal with any fallout */
 err:
diff --git a/boot/bootm_os.c b/boot/bootm_os.c
index df1aab4b3e4d..22ff62e5fb65 100644
--- a/boot/bootm_os.c
+++ b/boot/bootm_os.c
@@ -527,8 +527,8 @@ __weak void board_preboot_os(void)
 	/* please define board specific board_preboot_os() */
 }
 
-int boot_selected_os(int argc, char *const argv[], int state,
-		     struct bootm_headers *images, boot_os_fn *boot_fn)
+int boot_selected_os(int state, struct bootm_headers *images,
+		     boot_os_fn *boot_fn)
 {
 	arch_preboot_os();
 	board_preboot_os();
diff --git a/include/bootm.h b/include/bootm.h
index 0e4662485006..b8d74d03a8c4 100644
--- a/include/bootm.h
+++ b/include/bootm.h
@@ -42,8 +42,8 @@ boot_os_fn *bootm_os_get_boot_func(int os);
 int bootm_host_load_images(const void *fit, int cfg_noffset);
 #endif
 
-int boot_selected_os(int argc, char *const argv[], int state,
-		     struct bootm_headers *images, boot_os_fn *boot_fn);
+int boot_selected_os(int argc, struct bootm_headers *images,
+		     boot_os_fn *boot_fn);
 
 ulong bootm_disable_interrupts(void);
 
-- 
2.43.0.rc2.451.g8631bc7472-goog



More information about the U-Boot mailing list