From: Dinh Nguyen <dinguyen@kernel.org>
To: Thorsten Blum <thorsten.blum@linux.dev>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RESEND PATCH] nios2: Use str_yes_no() helper in show_cpuinfo()
Date: Mon, 16 Dec 2024 18:42:30 -0600 [thread overview]
Message-ID: <4b6088e7-88ec-4181-9f4a-f8411a11a4e7@kernel.org> (raw)
In-Reply-To: <20241209110640.39956-2-thorsten.blum@linux.dev>
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
prev parent reply other threads:[~2024-12-17 0:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 11:06 Thorsten Blum
2024-12-17 0:42 ` Dinh Nguyen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4b6088e7-88ec-4181-9f4a-f8411a11a4e7@kernel.org \
--to=dinguyen@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=thorsten.blum@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®