This function only uses one argument so pass it in directly.

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

 boot/bootm.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/boot/bootm.c b/boot/bootm.c
index ec43d4e7e8ba..2358d68c2861 100644
--- a/boot/bootm.c
+++ b/boot/bootm.c
@@ -304,8 +304,13 @@ static int bootm_pre_load(const char *addr_str)
        return ret;
 }
 
-static int bootm_find_os(struct cmd_tbl *cmdtp, int flag, int argc,
-                        char *const argv[])
+/**
+ * bootm_find_os(): Find the OS to boot
+ *
+ * @addr_fit: Address and/or FIT specifier (first arg of bootm command)
+ * Return: 0 on success, -ve on error
+ */
+static int bootm_find_os(const char *addr_fit)
 {
        const void *os_hdr;
 #ifdef CONFIG_ANDROID_BOOT_IMAGE
@@ -316,7 +321,7 @@ static int bootm_find_os(struct cmd_tbl *cmdtp, int flag, 
int argc,
        int ret;
 
        /* get kernel image header, start address and length */
-       ret = boot_get_kernel(argv[0], &images, &images.os.image_start,
+       ret = boot_get_kernel(addr_fit, &images, &images.os.image_start,
                              &images.os.image_len, &os_hdr);
        if (ret) {
                if (ret == -EPROTOTYPE)
@@ -986,7 +991,7 @@ int do_bootm_states(struct cmd_tbl *cmdtp, int flag, int 
argc,
                ret = bootm_pre_load(argv[0]);
 
        if (!ret && (states & BOOTM_STATE_FINDOS))
-               ret = bootm_find_os(cmdtp, flag, argc, argv);
+               ret = bootm_find_os(argv[0]);
 
        if (!ret && (states & BOOTM_STATE_FINDOTHER))
                ret = bootm_find_other(cmdtp, flag, argc, argv);
-- 
2.42.0.869.gea05f2083d-goog

Reply via email to