From: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
To: Thorsten Blum <thorsten.blum@linux.dev>,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
Naveen N Rao <naveen@kernel.org>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Hari Bathini <hbathini@linux.ibm.com>,
Sourabh Jain <sourabhjain@linux.ibm.com>,
Bjorn Helgaas <bhelgaas@google.com>,
"Aneesh Kumar K.V (IBM)" <aneesh.kumar@kernel.org>
Cc: Thorsten Blum <thorsten.blum@linux.dev>,
Baoquan He <bhe@redhat.com>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fadump: Use str_yes_no() helper in fadump_show_config()
Date: Mon, 13 Jan 2025 20:39:53 +0530 [thread overview]
Message-ID: <87ikqivjge.fsf@gmail.com> (raw)
In-Reply-To: <20241230214142.952706-2-thorsten.blum@linux.dev>
Thorsten Blum <thorsten.blum@linux.dev> writes:
> Remove hard-coded strings by using the str_yes_no() helper function.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
> arch/powerpc/kernel/fadump.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
In fadump.c file we have implicit include of string_choices.h i.e.
include/linux/seq_file.h -> linux/string_helpers.h -> linux/string_choices.h
Directly having string_choices include could be better.
#include <linux/string_choices.h>
However no hard preferences. The patch functionally looks correct to me.
Please feel free to add -
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
>
> diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
> index 4b371c738213..8c531533dd3e 100644
> --- a/arch/powerpc/kernel/fadump.c
> +++ b/arch/powerpc/kernel/fadump.c
> @@ -289,10 +289,8 @@ static void __init fadump_show_config(void)
> if (!fw_dump.fadump_supported)
> return;
>
> - pr_debug("Fadump enabled : %s\n",
> - (fw_dump.fadump_enabled ? "yes" : "no"));
> - pr_debug("Dump Active : %s\n",
> - (fw_dump.dump_active ? "yes" : "no"));
> + pr_debug("Fadump enabled : %s\n", str_yes_no(fw_dump.fadump_enabled));
> + pr_debug("Dump Active : %s\n", str_yes_no(fw_dump.dump_active));
> pr_debug("Dump section sizes:\n");
> pr_debug(" CPU state data size: %lx\n", fw_dump.cpu_state_data_size);
> pr_debug(" HPTE region size : %lx\n", fw_dump.hpte_region_size);
> --
> 2.47.1
prev parent reply other threads:[~2025-01-13 15:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-30 21:41 [PATCH] fadump: Use str_yes_no() helper in fadump_show_config() Thorsten Blum
2025-01-13 13:00 ` Sourabh Jain
2025-01-13 15:09 ` Ritesh Harjani [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=87ikqivjge.fsf@gmail.com \
--to=ritesh.list@gmail.com \
--cc=aneesh.kumar@kernel.org \
--cc=bhe@redhat.com \
--cc=bhelgaas@google.com \
--cc=christophe.leroy@csgroup.eu \
--cc=hbathini@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=naveen@kernel.org \
--cc=npiggin@gmail.com \
--cc=sourabhjain@linux.ibm.com \
--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;
as well as URLs for NNTP newsgroup(s).