[PATCH] Use bool value in set_cpu_online()

Zhao Ke posted 1 patch 1 year, 10 months ago
arch/riscv/kernel/smpboot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] Use bool value in set_cpu_online()
Posted by Zhao Ke 1 year, 10 months ago
The declaration of set_cpu_online() takes a bool value. So replace
int here to make it consistent with the declaration.

Signed-off-by: Zhao Ke <ke.zhao@shingroup.cn>
---
 arch/riscv/kernel/smpboot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c
index 519b6bd946e5..3f7c274653ab 100644
--- a/arch/riscv/kernel/smpboot.c
+++ b/arch/riscv/kernel/smpboot.c
@@ -229,7 +229,7 @@ asmlinkage __visible void smp_callin(void)
 	riscv_ipi_enable();
 
 	numa_add_cpu(curr_cpuid);
-	set_cpu_online(curr_cpuid, 1);
+	set_cpu_online(curr_cpuid, true);
 
 	if (has_vector()) {
 		if (riscv_v_setup_vsize())
-- 
2.34.1
Re: [PATCH] Use bool value in set_cpu_online()
Posted by Charlie Jenkins 1 year, 9 months ago
On Mon, Mar 18, 2024 at 02:54:04PM +0800, Zhao Ke wrote:
> The declaration of set_cpu_online() takes a bool value. So replace
> int here to make it consistent with the declaration.
> 
> Signed-off-by: Zhao Ke <ke.zhao@shingroup.cn>
> ---
>  arch/riscv/kernel/smpboot.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c
> index 519b6bd946e5..3f7c274653ab 100644
> --- a/arch/riscv/kernel/smpboot.c
> +++ b/arch/riscv/kernel/smpboot.c
> @@ -229,7 +229,7 @@ asmlinkage __visible void smp_callin(void)
>  	riscv_ipi_enable();
>  
>  	numa_add_cpu(curr_cpuid);
> -	set_cpu_online(curr_cpuid, 1);
> +	set_cpu_online(curr_cpuid, true);
>  
>  	if (has_vector()) {
>  		if (riscv_v_setup_vsize())
> -- 
> 2.34.1
> 
> 
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv

Thank you!

Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>