* [RESEND PATCH] nios2: Use str_yes_no() helper in show_cpuinfo()
@ 2024-12-09 11:06 Thorsten Blum
2024-12-17 0:42 ` Dinh Nguyen
0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2024-12-09 11:06 UTC (permalink / raw)
To: Dinh Nguyen; +Cc: Thorsten Blum, linux-kernel
Remove hard-coded strings by using the str_yes_no() helper function.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
arch/nios2/kernel/cpuinfo.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/nios2/kernel/cpuinfo.c b/arch/nios2/kernel/cpuinfo.c
index 338849c430a5..7b1e8f9128e9 100644
--- a/arch/nios2/kernel/cpuinfo.c
+++ b/arch/nios2/kernel/cpuinfo.c
@@ -143,11 +143,11 @@ static int show_cpuinfo(struct seq_file *m, void *v)
" DIV:\t\t%s\n"
" BMX:\t\t%s\n"
" CDX:\t\t%s\n",
- cpuinfo.has_mul ? "yes" : "no",
- cpuinfo.has_mulx ? "yes" : "no",
- cpuinfo.has_div ? "yes" : "no",
- cpuinfo.has_bmx ? "yes" : "no",
- cpuinfo.has_cdx ? "yes" : "no");
+ str_yes_no(cpuinfo.has_mul),
+ str_yes_no(cpuinfo.has_mulx),
+ str_yes_no(cpuinfo.has_div),
+ str_yes_no(cpuinfo.has_bmx),
+ str_yes_no(cpuinfo.has_cdx));
seq_printf(m,
"Icache:\t\t%ukB, line length: %u\n",
--
2.47.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RESEND PATCH] nios2: Use str_yes_no() helper in show_cpuinfo()
2024-12-09 11:06 [RESEND PATCH] nios2: Use str_yes_no() helper in show_cpuinfo() Thorsten Blum
@ 2024-12-17 0:42 ` Dinh Nguyen
0 siblings, 0 replies; 2+ messages in thread
From: Dinh Nguyen @ 2024-12-17 0:42 UTC (permalink / raw)
To: Thorsten Blum; +Cc: linux-kernel
On 12/9/24 05:06, Thorsten Blum wrote:
> Remove hard-coded strings by using the str_yes_no() helper function.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
> arch/nios2/kernel/cpuinfo.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/nios2/kernel/cpuinfo.c b/arch/nios2/kernel/cpuinfo.c
> index 338849c430a5..7b1e8f9128e9 100644
> --- a/arch/nios2/kernel/cpuinfo.c
> +++ b/arch/nios2/kernel/cpuinfo.c
> @@ -143,11 +143,11 @@ static int show_cpuinfo(struct seq_file *m, void *v)
> " DIV:\t\t%s\n"
> " BMX:\t\t%s\n"
> " CDX:\t\t%s\n",
> - cpuinfo.has_mul ? "yes" : "no",
> - cpuinfo.has_mulx ? "yes" : "no",
> - cpuinfo.has_div ? "yes" : "no",
> - cpuinfo.has_bmx ? "yes" : "no",
> - cpuinfo.has_cdx ? "yes" : "no");
> + str_yes_no(cpuinfo.has_mul),
> + str_yes_no(cpuinfo.has_mulx),
> + str_yes_no(cpuinfo.has_div),
> + str_yes_no(cpuinfo.has_bmx),
> + str_yes_no(cpuinfo.has_cdx));
>
> seq_printf(m,
> "Icache:\t\t%ukB, line length: %u\n",
Applied!
Thanks,
Dinh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-17 0:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-09 11:06 [RESEND PATCH] nios2: Use str_yes_no() helper in show_cpuinfo() Thorsten Blum
2024-12-17 0:42 ` Dinh Nguyen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.