Skip to contentSkip to conversation

Remove unused parameters

PATCH In review Yuepeng Xing 2 participants 2 messages Jul 28, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove unused parameters

Remove unused parameters from function arch_env_get_location

---
 arch/arm/cpu/armv8/fsl-layerscape/cpu.c           | 2 +-
 arch/arm/mach-imx/imx8m/soc.c                     | 2 +-
 board/theobroma-systems/puma_rk3399/puma-rk3399.c | 2 +-
 env/env.c                                         | 4 ++--
 include/env_internal.h                            | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)
arch/arm/cpu/armv8/fsl-layerscape/cpu.c +1 -1
index c11341a1d3..321900b6d5 100644
@@ -818,7 +818,7 @@ int mmc_get_env_dev(void)
 }
 #endif
 
-enum env_location arch_env_get_location(enum env_operation op, int prio)
+enum env_location arch_env_get_location(int prio)
 {
 	enum boot_src src = get_boot_src();
 	enum env_location env_loc = ENVL_NOWHERE;
arch/arm/mach-imx/imx8m/soc.c +1 -1
index a4863281e3..1fe7011f07 100644
@@ -1539,7 +1539,7 @@ void do_error(struct pt_regs *pt_regs)
 #endif
 
 #if defined(CONFIG_IMX8MN) || defined(CONFIG_IMX8MP)
-enum env_location arch_env_get_location(enum env_operation op, int prio)
+enum env_location arch_env_get_location(int prio)
 {
 	enum boot_device dev = get_boot_device();
 
board/theobroma-systems/puma_rk3399/puma-rk3399.c +1 -1
index 97f398bd75..3b3f1b0e9f 100644
@@ -140,7 +140,7 @@ int mmc_get_env_dev(void)
 #error Please enable CONFIG_ENV_IS_NOWHERE
 #endif
 
-enum env_location arch_env_get_location(enum env_operation op, int prio)
+enum env_location arch_env_get_location(int prio)
 {
 	const char *boot_device =
 		ofnode_read_chosen_string("u-boot,spl-boot-device");
env/env.c +2 -2
index 69848fb060..a8a94d4e2a 100644
@@ -128,7 +128,7 @@ static void env_set_inited(enum env_location location)
  * Returns:
  * an enum env_location value on success, a negative error code otherwise
  */
-__weak enum env_location arch_env_get_location(enum env_operation op, int prio)
+__weak enum env_location arch_env_get_location(int prio)
 {
 	if (prio >= ARRAY_SIZE(env_locations))
 		return ENVL_UNKNOWN;
@@ -156,7 +156,7 @@ __weak enum env_location arch_env_get_location(enum env_operation op, int prio)
  */
 __weak enum env_location env_get_location(enum env_operation op, int prio)
 {
-	return arch_env_get_location(op, prio);
+	return arch_env_get_location(prio);
 }
 
 /**
include/env_internal.h +1 -1
index f30fd6159d..4aaa40d17c 100644
@@ -246,7 +246,7 @@ const char *env_ext4_get_dev_part(void);
  *        highest priority
  * Return:  an enum env_location value on success, or -ve error code.
  */
-enum env_location arch_env_get_location(enum env_operation op, int prio);
+enum env_location arch_env_get_location(int prio);
 
 /**
  * env_get_location()- Provide the best location for the U-Boot environment
Signature · 1 line
2.31.1.windows.1
#1 lore raw

Hi,

Quoted 2 lines · Yuepeng Xing

Remove unused parameters from function arch_env_get_location

What is the motivation for this patch?

I don't know for sure, but perhaps the operation is important in deciding which location to use?

Quoted 9 lines
---
 arch/arm/cpu/armv8/fsl-layerscape/cpu.c           | 2 +-
 arch/arm/mach-imx/imx8m/soc.c                     | 2 +-
 board/theobroma-systems/puma_rk3399/puma-rk3399.c | 2 +-
 env/env.c                                         | 4 ++--
 include/env_internal.h                            | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

Regards,
Simon