lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87ikqivjge.fsf@gmail.com>
Date: Mon, 13 Jan 2025 20:39:53 +0530
From: Ritesh Harjani (IBM) <ritesh.list@...il.com>
To: Thorsten Blum <thorsten.blum@...ux.dev>, Michael Ellerman <mpe@...erman.id.au>, Nicholas Piggin <npiggin@...il.com>, Christophe Leroy <christophe.leroy@...roup.eu>, Naveen N Rao <naveen@...nel.org>, Madhavan Srinivasan <maddy@...ux.ibm.com>, Hari Bathini <hbathini@...ux.ibm.com>, Sourabh Jain <sourabhjain@...ux.ibm.com>, Bjorn Helgaas <bhelgaas@...gle.com>, "Aneesh Kumar K.V (IBM)" <aneesh.kumar@...nel.org>
Cc: Thorsten Blum <thorsten.blum@...ux.dev>, Baoquan He <bhe@...hat.com>, linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fadump: Use str_yes_no() helper in fadump_show_config()

Thorsten Blum <thorsten.blum@...ux.dev> writes:

> Remove hard-coded strings by using the str_yes_no() helper function.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@...ux.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@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ