Skip to contentSkip to conversation

riscv: cpu_ops_sbi: smp_processor_id() returns int, not unsigned int

PATCH In review Ben Dooks 2 participants 2 messages Jan 2 – Jan 7 RISC-V

lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 riscv: cpu_ops_sbi: smp_processor_id() returns int, not unsigned int

The print in sbi_cpu_stop() assumes smp_processor_id() returns an unsigned int, when it is actually an int. Fix the format string to avoid mismatch type warnings in rht pr_crit().

---
 arch/riscv/kernel/cpu_ops_sbi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/kernel/cpu_ops_sbi.c +1 -1
index 87d655944803..00aff669f5f2 100644
@@ -85,7 +85,7 @@ static void sbi_cpu_stop(void)
 	int ret;
 
 	ret = sbi_hsm_hart_stop();
-	pr_crit("Unable to stop the cpu %u (%d)\n", smp_processor_id(), ret);
+	pr_crit("Unable to stop the cpu %d (%d)\n", smp_processor_id(), ret);
 }
 
 static int sbi_cpu_is_stopped(unsigned int cpuid)
Signature · 1 line
2.37.2.352.g3c44437643
maintainer
#1 lore raw
Quoted 5 lines · Ben Dooks

The print in sbi_cpu_stop() assumes smp_processor_id() returns an unsigned int, when it is actually an int. Fix the format string to avoid mismatch type warnings in rht pr_crit().

Thanks, queued for v6.19-rc.

- Paul