Skip to contentSkip to conversation

Remove unused parameters

PATCH In review Shenlin Liang 2 participants 2 messages Jul 28, 2023 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove unused parameters

Removes unused function arguments from the riscv_cpu_setup function

---
 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(-)
arch/riscv/cpu/cpu.c +1 -1
index ecfb1fb08c..728cdfe9c9 100644
@@ -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;
 
arch/riscv/include/asm/system.h +1 -1
index ffa7649f3f..87a804bfd5 100644
@@ -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 */
arch/riscv/lib/spl.c +1 -1
index f4d3b67e5d..9b242ed821 100644
@@ -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();
 
board/starfive/visionfive2/spl.c +1 -1
index 7acd3995aa..ad5f71a201 100644
@@ -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,
Signature · 1 line
2.31.1.windows.1
#1 lore raw

Hi,

Quoted 16 lines · Shenlin Liang

Removes unused function arguments from the riscv_cpu_setup function

---
 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(-)
arch/riscv/cpu/cpu.c +0 -0
index ecfb1fb08c..728cdfe9c9 100644

arch/riscv/cpu/cpu.c static void dummy_pending_ipi_clear(ulong hart, ulong arg0, ulong arg1) · line 94

Quoted 4 lines
arch/riscv/cpu/cpu.c +0 -1
@@ -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?

Quoted 43 lines
arch/riscv/cpu/cpu.c +1 -0
+int riscv_cpu_setup(void)
 {
        int ret;
 
arch/riscv/include/asm/system.h +1 -1
index ffa7649f3f..87a804bfd5 100644
@@ -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 */
arch/riscv/lib/spl.c +1 -1
index f4d3b67e5d..9b242ed821 100644
@@ -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();
 
board/starfive/visionfive2/spl.c +1 -2
index 7acd3995aa..ad5f71a201 100644
@@ -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,
--
Quoted 2 lines

2.31.1.windows.1

Regards,
Simon