[PATCH v2 15/21] bootm: Rename do_bootm_states() to bootm_run_states()

Simon Glass sjg at chromium.org
Thu Dec 14 17:50:24 CET 2023


Rename the function to bootm_run_states() to better indicate ts
purpose. The 'do_' prefix is used to indicate a command processor,
which this is now not.

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

Changes in v2:
- Split do_bootm_states() rename to a separate patch

 arch/mips/lib/bootm.c | 2 +-
 boot/bootm.c          | 4 ++--
 cmd/booti.c           | 4 ++--
 cmd/bootm.c           | 4 ++--
 cmd/bootz.c           | 4 ++--
 include/bootm.h       | 4 ++--
 6 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index 286dbd5c4581..adb6b6cc229e 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -217,7 +217,7 @@ static int boot_reloc_fdt(struct bootm_headers *images)
 {
 	/*
 	 * In case of legacy uImage's, relocation of FDT is already done
-	 * by do_bootm_states() and should not repeated in 'bootm prep'.
+	 * by bootm_run_states() and should not repeated in 'bootm prep'.
 	 */
 	if (images->state & BOOTM_STATE_FDT) {
 		debug("## FDT already relocated\n");
diff --git a/boot/bootm.c b/boot/bootm.c
index 7156149dfae9..bd208c0493ca 100644
--- a/boot/bootm.c
+++ b/boot/bootm.c
@@ -990,7 +990,7 @@ unmap_image:
 	return ret;
 }
 
-int do_bootm_states(struct bootm_info *bmi, int states)
+int bootm_run_states(struct bootm_info *bmi, int states)
 {
 	struct bootm_headers *images = bmi->images;
 	boot_os_fn *boot_fn;
@@ -1152,7 +1152,7 @@ int bootm_boot_start(ulong addr, const char *cmdline)
 	bootm_init(&bmi);
 	bmi.addr_fit = addr_str;
 	bmi.cmd_name = "bootm";
-	ret = do_bootm_states(&bmi, states);
+	ret = bootm_run_states(&bmi, states);
 
 	return ret;
 }
diff --git a/cmd/booti.c b/cmd/booti.c
index 3fa153eb5e54..55f7ba67611f 100644
--- a/cmd/booti.c
+++ b/cmd/booti.c
@@ -34,7 +34,7 @@ static int booti_start(struct bootm_info *bmi)
 	unsigned long decomp_len;
 	int ctype;
 
-	ret = do_bootm_states(bmi, BOOTM_STATE_START);
+	ret = bootm_run_states(bmi, BOOTM_STATE_START);
 
 	/* Setup Linux kernel Image entry point */
 	if (!bmi->addr_fit) {
@@ -141,7 +141,7 @@ int do_booti(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 	if (IS_ENABLED(CONFIG_SYS_BOOT_RAMDISK_HIGH))
 		states |= BOOTM_STATE_RAMDISK;
 
-	ret = do_bootm_states(&bmi, states);
+	ret = bootm_run_states(&bmi, states);
 
 	return ret;
 }
diff --git a/cmd/bootm.c b/cmd/bootm.c
index 42a5cf2fa987..4060800cb3b3 100644
--- a/cmd/bootm.c
+++ b/cmd/bootm.c
@@ -118,7 +118,7 @@ static int do_bootm_subcommand(struct cmd_tbl *cmdtp, int flag, int argc,
 	bmi.argc = argc;
 	bmi.argv = argv;
 
-	ret = do_bootm_states(&bmi, state);
+	ret = bootm_run_states(&bmi, state);
 
 #if defined(CONFIG_CMD_BOOTM_PRE_LOAD)
 	if (!ret && (state & BOOTM_STATE_PRE_LOAD))
@@ -180,7 +180,7 @@ int do_bootm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 	bmi.argc = argc;
 	bmi.argv = argv;
 
-	ret = do_bootm_states(&bmi, states);
+	ret = bootm_run_states(&bmi, states);
 
 	return ret ? CMD_RET_FAILURE : 0;
 }
diff --git a/cmd/bootz.c b/cmd/bootz.c
index 9aa07b682d1c..aa8339318413 100644
--- a/cmd/bootz.c
+++ b/cmd/bootz.c
@@ -40,7 +40,7 @@ static int bootz_start(struct cmd_tbl *cmdtp, int flag, int argc,
 		bmi.conf_fdt = argv[2];
 	/* do not set up argc and argv[] since nothing uses them */
 
-	ret = do_bootm_states(&bmi, BOOTM_STATE_START);
+	ret = bootm_run_states(&bmi, BOOTM_STATE_START);
 
 	/* Setup Linux kernel zImage entry point */
 	if (!argc) {
@@ -104,7 +104,7 @@ int do_bootz(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 	if (IS_ENABLED(CONFIG_SYS_BOOT_RAMDISK_HIGH))
 		states |= BOOTM_STATE_RAMDISK;
 
-	ret = do_bootm_states(&bmi, states);
+	ret = bootm_run_states(&bmi, states);
 
 	return ret;
 }
diff --git a/include/bootm.h b/include/bootm.h
index 1f83c160767f..45109f96695d 100644
--- a/include/bootm.h
+++ b/include/bootm.h
@@ -132,7 +132,7 @@ int bootm_find_images(ulong img_addr, const char *conf_ramdisk,
 int bootm_measure(struct bootm_headers *images);
 
 /**
- * do_bootm_states() - Execute selected states of the bootm command.
+ * bootm_run_states() - Execute selected states of the bootm command.
  *
  * Note that if states contains more than one flag it MUST contain
  * BOOTM_STATE_START, since this handles the addr_fit, conf_ramdisk and conf_fit
@@ -149,7 +149,7 @@ int bootm_measure(struct bootm_headers *images);
  *	then the intent is to boot an OS, so this function will not return
  *	unless the image type is standalone.
  */
-int do_bootm_states(struct bootm_info *bmi, int states);
+int bootm_run_states(struct bootm_info *bmi, int states);
 
 void arch_preboot_os(void);
 
-- 
2.43.0.472.g3155946c3a-goog



More information about the U-Boot mailing list