[PATCH 2/2] riscv: Correct event usage for riscv_cpu_probe/setup

Tom Rini trini at konsulko.com
Mon Sep 4 21:06:35 CEST 2023


With having both an EVENT_SPY_SIMPLE setup for both riscv_cpu_probe and
riscv_cpu_setup we do not need the latter function to call the former
function as it will already have been done in time.

Fixes: 1c55d62fb9cc ("riscv: cpu: make riscv_cpu_probe to EVT_DM_POST_INIT_R callback")
Signed-off-by: Tom Rini <trini at konsulko.com>
---
Cc: Rick Chen <rick at andestech.com>
Cc: Leo Yu-Chi Liang  <ycliang at andestech.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Nikita Shubin <n.shubin at yadro.com>
Cc: Chanho Park <chanho61.park at samsung.com>
Cc: Yu Chien Peter Lin <peterlin at andestech.com>
---
 arch/riscv/cpu/cpu.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/arch/riscv/cpu/cpu.c b/arch/riscv/cpu/cpu.c
index cfe9fdc9df55..c1a9638c1ab7 100644
--- a/arch/riscv/cpu/cpu.c
+++ b/arch/riscv/cpu/cpu.c
@@ -94,11 +94,7 @@ static void dummy_pending_ipi_clear(ulong hart, ulong arg0, ulong arg1)
 
 int riscv_cpu_setup(void)
 {
-	int ret;
-
-	ret = riscv_cpu_probe(ctx, event);
-	if (ret)
-		return ret;
+	int __maybe_unused ret;
 
 	/* Enable FPU */
 	if (supports_extension('d') || supports_extension('f')) {
-- 
2.34.1



More information about the U-Boot mailing list