diff mbox series

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

Message ID 20231204002642.895926-5-sjg@chromium.org
State Superseded
Delegated to: Tom Rini
Headers show
Series Complete decoupling of bootm logic from commands | expand

Commit Message

Simon Glass Dec. 4, 2023, 12:26 a.m. UTC
The argc and argv parameters are not used now, so drop them.

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

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

Comments

Tom Rini Dec. 9, 2023, 3:58 p.m. UTC | #1
On Sun, Dec 03, 2023 at 05:26:22PM -0700, Simon Glass wrote:

> The argc and argv parameters are not used now, so drop them.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

This along with patches 1-5 depend on what the answer is about how
NetBSD certainly already expects to use things.
diff mbox series

Patch

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);