* [RESEND. PATCH] riscv: Use '%u' to format the output of 'cpu'
@ 2024-09-12 13:49 WangYuli
2024-09-12 20:37 ` Charlie Jenkins
2024-09-12 22:12 ` Maciej W. Rozycki
0 siblings, 2 replies; 5+ messages in thread
From: WangYuli @ 2024-09-12 13:49 UTC (permalink / raw)
To: paul.walmsley, palmer, aou, samuel.holland, conor.dooley
Cc: linux-riscv, linux-kernel, atish.patra, anup, guanwentao, zhanjun,
WangYuli
'cpu' is an unsigned integer, so its placeholder should be %u, not %d.
Suggested-by: Wentao Guan <guanwentao@uniontech.com>
Signed-off-by: WangYuli <wangyuli@uniontech.com>
---
arch/riscv/kernel/cpu-hotplug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/kernel/cpu-hotplug.c b/arch/riscv/kernel/cpu-hotplug.c
index 28b58fc5ad19..a1e38ecfc8be 100644
--- a/arch/riscv/kernel/cpu-hotplug.c
+++ b/arch/riscv/kernel/cpu-hotplug.c
@@ -58,7 +58,7 @@ void arch_cpuhp_cleanup_dead_cpu(unsigned int cpu)
if (cpu_ops->cpu_is_stopped)
ret = cpu_ops->cpu_is_stopped(cpu);
if (ret)
- pr_warn("CPU%d may not have stopped: %d\n", cpu, ret);
+ pr_warn("CPU%u may not have stopped: %d\n", cpu, ret);
}
/*
--
2.43.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [RESEND. PATCH] riscv: Use '%u' to format the output of 'cpu'
2024-09-12 13:49 [RESEND. PATCH] riscv: Use '%u' to format the output of 'cpu' WangYuli
@ 2024-09-12 20:37 ` Charlie Jenkins
2024-09-13 3:11 ` WangYuli
2024-09-12 22:12 ` Maciej W. Rozycki
1 sibling, 1 reply; 5+ messages in thread
From: Charlie Jenkins @ 2024-09-12 20:37 UTC (permalink / raw)
To: WangYuli
Cc: paul.walmsley, palmer, aou, samuel.holland, conor.dooley,
linux-riscv, linux-kernel, atish.patra, anup, guanwentao, zhanjun
On Thu, Sep 12, 2024 at 09:49:46PM +0800, WangYuli wrote:
> 'cpu' is an unsigned integer, so its placeholder should be %u, not %d.
>
> Suggested-by: Wentao Guan <guanwentao@uniontech.com>
> Signed-off-by: WangYuli <wangyuli@uniontech.com>
> ---
> arch/riscv/kernel/cpu-hotplug.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/riscv/kernel/cpu-hotplug.c b/arch/riscv/kernel/cpu-hotplug.c
> index 28b58fc5ad19..a1e38ecfc8be 100644
> --- a/arch/riscv/kernel/cpu-hotplug.c
> +++ b/arch/riscv/kernel/cpu-hotplug.c
> @@ -58,7 +58,7 @@ void arch_cpuhp_cleanup_dead_cpu(unsigned int cpu)
> if (cpu_ops->cpu_is_stopped)
> ret = cpu_ops->cpu_is_stopped(cpu);
> if (ret)
> - pr_warn("CPU%d may not have stopped: %d\n", cpu, ret);
> + pr_warn("CPU%u may not have stopped: %d\n", cpu, ret);
> }
>
> /*
> --
> 2.43.4
Thanks!
Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>
Tested-by: Charlie Jenkins <charlie@rivosinc.com>
>
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RESEND. PATCH] riscv: Use '%u' to format the output of 'cpu'
2024-09-12 13:49 [RESEND. PATCH] riscv: Use '%u' to format the output of 'cpu' WangYuli
2024-09-12 20:37 ` Charlie Jenkins
@ 2024-09-12 22:12 ` Maciej W. Rozycki
2024-09-13 2:51 ` WangYuli
1 sibling, 1 reply; 5+ messages in thread
From: Maciej W. Rozycki @ 2024-09-12 22:12 UTC (permalink / raw)
To: WangYuli
Cc: paul.walmsley, Palmer Dabbelt, aou, samuel.holland, conor.dooley,
linux-riscv, linux-kernel, atish.patra, anup, guanwentao, zhanjun
On Thu, 12 Sep 2024, WangYuli wrote:
> 'cpu' is an unsigned integer, so its placeholder should be %u, not %d.
NB the proper ISO C and POSIX term for `%u', `%d', etc. is "conversion
specifier" rather than "placeholder".
Maciej
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RESEND. PATCH] riscv: Use '%u' to format the output of 'cpu'
2024-09-12 22:12 ` Maciej W. Rozycki
@ 2024-09-13 2:51 ` WangYuli
0 siblings, 0 replies; 5+ messages in thread
From: WangYuli @ 2024-09-13 2:51 UTC (permalink / raw)
To: Maciej W. Rozycki
Cc: paul.walmsley, Palmer Dabbelt, aou, samuel.holland, conor.dooley,
linux-riscv, linux-kernel, atish.patra, anup, guanwentao, zhanjun
[-- Attachment #1.1.1: Type: text/plain, Size: 307 bytes --]
On 2024/9/13 06:12, Maciej W. Rozycki wrote:
> NB the proper ISO C and POSIX term for `%u', `%d', etc. is "conversion
> specifier" rather than "placeholder".
Thanks for pointing that out.
"conversion specifier" is much better and more professional.
>
> Maciej
>
Thanks,
--
WangYuli
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 645 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [RESEND. PATCH] riscv: Use '%u' to format the output of 'cpu'
2024-09-12 20:37 ` Charlie Jenkins
@ 2024-09-13 3:11 ` WangYuli
0 siblings, 0 replies; 5+ messages in thread
From: WangYuli @ 2024-09-13 3:11 UTC (permalink / raw)
To: Charlie Jenkins, Maciej W. Rozycki
Cc: paul.walmsley, palmer, aou, samuel.holland, conor.dooley,
linux-riscv, linux-kernel, atish.patra, anup, guanwentao, zhanjun
[-- Attachment #1.1.1: Type: text/plain, Size: 452 bytes --]
On 2024/9/13 04:37, Charlie Jenkins wrote:
> Thanks!
>
> Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>
> Tested-by: Charlie Jenkins <charlie@rivosinc.com>
>
Thank Maciej W. Rozycki for his valuable input.
I have revised the commit msg (only) and resent a patch v2, with your
Reviewed-by and Tested-by.
Link:
https://lore.kernel.org/all/F5FDA7123183ED96+20240913030252.857482-1-wangyuli@uniontech.com/
Thanks,
--
WangYuli
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 645 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-09-13 3:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-12 13:49 [RESEND. PATCH] riscv: Use '%u' to format the output of 'cpu' WangYuli
2024-09-12 20:37 ` Charlie Jenkins
2024-09-13 3:11 ` WangYuli
2024-09-12 22:12 ` Maciej W. Rozycki
2024-09-13 2:51 ` WangYuli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox