From 453dfed3ad00aece8bd8edee2fec460fb92c273f Mon Sep 17 00:00:00 2001 From: Yong Cong Sin Date: Fri, 4 Oct 2024 01:38:33 +0800 Subject: [PATCH] arch: riscv: smp: prevent nested #ifdef The `CONFIG_PLIC_IRQ_AFFINITY` depends on `CONFIG_SMP` in the Kconfig layer, nested #ifdef can be avoided for readability. Signed-off-by: Yong Cong Sin Signed-off-by: Yong Cong Sin --- arch/riscv/core/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/core/smp.c b/arch/riscv/core/smp.c index bc56c1fba8c6f4..15cb0063950194 100644 --- a/arch/riscv/core/smp.c +++ b/arch/riscv/core/smp.c @@ -74,11 +74,11 @@ void arch_secondary_cpu_init(int hartid) #endif #ifdef CONFIG_SMP irq_enable(RISCV_IRQ_MSOFT); +#endif /* CONFIG_SMP */ #ifdef CONFIG_PLIC_IRQ_AFFINITY /* Enable on secondary cores so that they can respond to PLIC */ irq_enable(RISCV_IRQ_MEXT); #endif /* CONFIG_PLIC_IRQ_AFFINITY */ -#endif /* CONFIG_SMP */ riscv_cpu_init[cpu_num].fn(riscv_cpu_init[cpu_num].arg); }