public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] Remove unused parameters
@ 2023-07-28  7:01 Shenlin Liang
  2023-07-28 17:32 ` Simon Glass
  0 siblings, 1 reply; 4+ messages in thread
From: Shenlin Liang @ 2023-07-28  7:01 UTC (permalink / raw)
  To: u-boot; +Cc: Shenlin Liang

Removes unused function arguments from the riscv_cpu_setup function

Signed-off-by: Shenlin Liang <liangshenlin@eswincomputing.com>
---
 arch/riscv/cpu/cpu.c             | 2 +-
 arch/riscv/include/asm/system.h  | 2 +-
 arch/riscv/lib/spl.c             | 2 +-
 board/starfive/visionfive2/spl.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/riscv/cpu/cpu.c b/arch/riscv/cpu/cpu.c
index ecfb1fb08c..728cdfe9c9 100644
--- a/arch/riscv/cpu/cpu.c
+++ b/arch/riscv/cpu/cpu.c
@@ -91,7 +91,7 @@ static void dummy_pending_ipi_clear(ulong hart, ulong arg0, ulong arg1)
 }
 #endif
 
-int riscv_cpu_setup(void *ctx, struct event *event)
+int riscv_cpu_setup(void)
 {
 	int ret;
 
diff --git a/arch/riscv/include/asm/system.h b/arch/riscv/include/asm/system.h
index ffa7649f3f..87a804bfd5 100644
--- a/arch/riscv/include/asm/system.h
+++ b/arch/riscv/include/asm/system.h
@@ -26,6 +26,6 @@ struct event;
     } while (0)
 
 /* Hook to set up the CPU (called from SPL too) */
-int riscv_cpu_setup(void *ctx, struct event *event);
+int riscv_cpu_setup(void);
 
 #endif	/* __ASM_RISCV_SYSTEM_H */
diff --git a/arch/riscv/lib/spl.c b/arch/riscv/lib/spl.c
index f4d3b67e5d..9b242ed821 100644
--- a/arch/riscv/lib/spl.c
+++ b/arch/riscv/lib/spl.c
@@ -28,7 +28,7 @@ __weak void board_init_f(ulong dummy)
 	if (ret)
 		panic("spl_early_init() failed: %d\n", ret);
 
-	riscv_cpu_setup(NULL, NULL);
+	riscv_cpu_setup();
 
 	preloader_console_init();
 
diff --git a/board/starfive/visionfive2/spl.c b/board/starfive/visionfive2/spl.c
index 7acd3995aa..ad5f71a201 100644
--- a/board/starfive/visionfive2/spl.c
+++ b/board/starfive/visionfive2/spl.c
@@ -218,7 +218,7 @@ void board_init_f(ulong dummy)
 	if (ret)
 		panic("spl_early_init() failed: %d\n", ret);
 
-	riscv_cpu_setup(NULL, NULL);
+	riscv_cpu_setup();
 	preloader_console_init();
 
 	/* Set the parent clock of cpu_root clock to pll0,
-- 
2.31.1.windows.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] Remove unused parameters
@ 2023-07-28  9:31 Yuepeng Xing
  2023-07-28 17:32 ` Simon Glass
  0 siblings, 1 reply; 4+ messages in thread
From: Yuepeng Xing @ 2023-07-28  9:31 UTC (permalink / raw)
  To: u-boot; +Cc: zhuwenjun, zhengyu, jinyanjiang, Yuepeng Xing

Remove unused parameters from function arch_env_get_location

Signed-off-by: Yuepeng Xing <xingyuepeng@eswincomputing.com>
---
 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(-)

diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
index c11341a1d3..321900b6d5 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
@@ -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;
diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c
index a4863281e3..1fe7011f07 100644
--- a/arch/arm/mach-imx/imx8m/soc.c
+++ b/arch/arm/mach-imx/imx8m/soc.c
@@ -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();
 
diff --git a/board/theobroma-systems/puma_rk3399/puma-rk3399.c b/board/theobroma-systems/puma_rk3399/puma-rk3399.c
index 97f398bd75..3b3f1b0e9f 100644
--- a/board/theobroma-systems/puma_rk3399/puma-rk3399.c
+++ b/board/theobroma-systems/puma_rk3399/puma-rk3399.c
@@ -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");
diff --git a/env/env.c b/env/env.c
index 69848fb060..a8a94d4e2a 100644
--- a/env/env.c
+++ b/env/env.c
@@ -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);
 }
 
 /**
diff --git a/include/env_internal.h b/include/env_internal.h
index f30fd6159d..4aaa40d17c 100644
--- a/include/env_internal.h
+++ b/include/env_internal.h
@@ -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
-- 
2.31.1.windows.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Remove unused parameters
  2023-07-28  7:01 [PATCH] Remove unused parameters Shenlin Liang
@ 2023-07-28 17:32 ` Simon Glass
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Glass @ 2023-07-28 17:32 UTC (permalink / raw)
  To: liangshenlin; +Cc: u-boot

Hi,

On Fri, 28 Jul 2023 at 06:19, Shenlin Liang
<liangshenlin@eswincomputing.com> wrote:
>
> Removes unused function arguments from the riscv_cpu_setup function
>
> Signed-off-by: Shenlin Liang <liangshenlin@eswincomputing.com>
> ---
>  arch/riscv/cpu/cpu.c             | 2 +-
>  arch/riscv/include/asm/system.h  | 2 +-
>  arch/riscv/lib/spl.c             | 2 +-
>  board/starfive/visionfive2/spl.c | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/riscv/cpu/cpu.c b/arch/riscv/cpu/cpu.c
> index ecfb1fb08c..728cdfe9c9 100644
> --- a/arch/riscv/cpu/cpu.c
> +++ b/arch/riscv/cpu/cpu.c
> @@ -91,7 +91,7 @@ static void dummy_pending_ipi_clear(ulong hart, ulong arg0, ulong arg1)
>  }
>  #endif
>
> -int riscv_cpu_setup(void *ctx, struct event *event)

These params are needed since there is an EVENT_SPY() declaration just
below it. It needs those params.

Or perhaps you have another patch to remove it?

> +int riscv_cpu_setup(void)
>  {
>         int ret;
>
> diff --git a/arch/riscv/include/asm/system.h b/arch/riscv/include/asm/system.h
> index ffa7649f3f..87a804bfd5 100644
> --- a/arch/riscv/include/asm/system.h
> +++ b/arch/riscv/include/asm/system.h
> @@ -26,6 +26,6 @@ struct event;
>      } while (0)
>
>  /* Hook to set up the CPU (called from SPL too) */
> -int riscv_cpu_setup(void *ctx, struct event *event);
> +int riscv_cpu_setup(void);
>
>  #endif /* __ASM_RISCV_SYSTEM_H */
> diff --git a/arch/riscv/lib/spl.c b/arch/riscv/lib/spl.c
> index f4d3b67e5d..9b242ed821 100644
> --- a/arch/riscv/lib/spl.c
> +++ b/arch/riscv/lib/spl.c
> @@ -28,7 +28,7 @@ __weak void board_init_f(ulong dummy)
>         if (ret)
>                 panic("spl_early_init() failed: %d\n", ret);
>
> -       riscv_cpu_setup(NULL, NULL);
> +       riscv_cpu_setup();
>
>         preloader_console_init();
>
> diff --git a/board/starfive/visionfive2/spl.c b/board/starfive/visionfive2/spl.c
> index 7acd3995aa..ad5f71a201 100644
> --- a/board/starfive/visionfive2/spl.c
> +++ b/board/starfive/visionfive2/spl.c
> @@ -218,7 +218,7 @@ void board_init_f(ulong dummy)
>         if (ret)
>                 panic("spl_early_init() failed: %d\n", ret);
>
> -       riscv_cpu_setup(NULL, NULL);
> +       riscv_cpu_setup();
>         preloader_console_init();
>
>         /* Set the parent clock of cpu_root clock to pll0,
> --
> 2.31.1.windows.1
>

Regards,
Simon

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Remove unused parameters
  2023-07-28  9:31 Yuepeng Xing
@ 2023-07-28 17:32 ` Simon Glass
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Glass @ 2023-07-28 17:32 UTC (permalink / raw)
  To: xingyuepeng; +Cc: u-boot, zhuwenjun, zhengyu, jinyanjiang

Hi,

On Fri, 28 Jul 2023 at 06:19, Yuepeng Xing
<xingyuepeng@eswincomputing.com> wrote:
>
> 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?
>
> Signed-off-by: Yuepeng Xing <xingyuepeng@eswincomputing.com>
> ---
>  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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-28 17:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-28  7:01 [PATCH] Remove unused parameters Shenlin Liang
2023-07-28 17:32 ` Simon Glass
  -- strict thread matches above, loose matches on Subject: below --
2023-07-28  9:31 Yuepeng Xing
2023-07-28 17:32 ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox