riscv: remove redundant check for CONFIG_SMP
PATCH 1/2 riscv: remove redundant check for CONFIG_SMP
In the arch/riscv/Kconfig, the HOTPLUG_CPU depends on SMP, hence if the HOTPLUG_CPU is defined, the SMP has to be defined, it is not necessary to check SMP here.
--- arch/riscv/include/asm/smp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/include/asm/smp.h +1 -1
@@ -105,7 +105,7 @@ static inline void riscv_ipi_set_virq_range(int virq, int nr)#endif /* CONFIG_SMP */ -#if defined(CONFIG_HOTPLUG_CPU ) && (CONFIG_SMP ) +#if defined(CONFIG_HOTPLUG_CPU )bool cpu_has_hotplug (unsigned int cpu);#else static inline bool cpu_has_hotplug (unsigned int cpu)
Signature · 7 lines
2.43.0 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH 2/2 riscv: remove redundant #ifdef check in cpu-hotplug
The cpu-hotplug.c only is built when CONFIG_HOTPLUG_CPU is defined, it is not needed to check HOTPLUG_CPU in this file.
--- arch/riscv/kernel/cpu-hotplug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/riscv/kernel/cpu-hotplug.c +1 -2
@@ -43,7 +43,6 @@ int __cpu_disable(void)return 0 ; } -#ifdef CONFIG_HOTPLUG_CPU /* * Called on the thread which is asking for a CPU to be shutdown, if the * CPU reported dead to the hotplug core.
@@ -75,4 +74,4 @@ void __noreturn arch_cpu_idle_dead(void)/* It should never reach here */ BUG (); } -#endif +
Signature · 7 lines
2.43.0 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Paul Walmsley
maintainerRe: [PATCH 2/2] riscv: remove redundant #ifdef check in cpu-hotplug
Quoted 4 lines · Hui Wang
The
cpu-hotplug.conly is built whenCONFIG_HOTPLUG_CPUis defined, it is not needed to checkHOTPLUG_CPUin this file.Signed-off-by Hui Wang <[email protected]>
Thanks, queued for v7.0-rc.
- Paul
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Paul Walmsley
maintainerQuoted 5 lines · Hui Wang
In the
arch/riscv/Kconfig, theHOTPLUG_CPUdepends on SMP, hence if theHOTPLUG_CPUis defined, the SMP has to be defined, it is not necessary to check SMP here.Signed-off-by Hui Wang <[email protected]>
Thanks, queued for v7.0-rc.
- Paul
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv