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] [thread-next>] [day] [month] [year] [list]
Message-ID: <45807c0e9fc818dd433746fbb55988c73b016477.camel@perches.com>
Date:   Sat, 18 Feb 2023 06:54:11 -0800
From:   Joe Perches <joe@...ches.com>
To:     Christophe Leroy <christophe.leroy@...roup.eu>,
        Pali Rohár <pali@...nel.org>,
        Michael Ellerman <mpe@...erman.id.au>,
        Nicholas Piggin <npiggin@...il.com>
Cc:     linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH v2 09/10] powerpc: Use ppc_md_progress()

On Sat, 2023-02-18 at 10:15 +0100, Christophe Leroy wrote:
> Many places have:
> 
> 	if (ppc.md_progress)
> 		ppc.md_progress();
> 
> Use ppc_md_progress() instead.
> 
> Note that checkpatch complains about using function names,
> but this is not a function taking format strings, so we
> leave the function names for now.

If you are changing almost all of these uses, why not
drop the unused 2nd argument 'hex' at the same time?

void ppc_printk_progress(char *s, unsigned short hex)
{
	pr_info("%s\n", s);
}

> diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
[]
> @@ -127,8 +127,7 @@ __setup("l3cr=", ppc_setup_l3cr);
>  static int __init ppc_init(void)
>  {
>  	/* clear the progress line */
> -	if (ppc_md.progress)
> -		ppc_md.progress("             ", 0xffff);
> +	ppc_md_progress("             ", 0xffff);

	ppc_md_progress("             ");

Although this example seems especially useless.

> diff --git a/arch/powerpc/mm/book3s32/mmu.c b/arch/powerpc/mm/book3s32/mmu.c
[]
> @@ -347,7 +347,7 @@ void __init MMU_init_hw(void)
>  	if (!mmu_has_feature(MMU_FTR_HPTE_TABLE))
>  		return;
>  
> -	if ( ppc_md.progress ) ppc_md.progress("hash:enter", 0x105);
> +	ppc_md_progress("hash:enter", 0x105);

	ppc_md_progress("hash:enter");

[]

> diff --git a/arch/powerpc/platforms/52xx/efika.c b/arch/powerpc/platforms/52xx/efika.c
[]
> @@ -189,8 +189,7 @@ static void __init efika_setup_arch(void)
>  	mpc52xx_pm_init();
>  #endif
>  
> -	if (ppc_md.progress)
> -		ppc_md.progress("Linux/PPC " UTS_RELEASE " running on Efika ;-)\n", 0x0);
> +	ppc_md_progress("Linux/PPC " UTS_RELEASE " running on Efika ;-)\n", 0x0);

And perhaps remove the extra newlines here and other places as
it doesn't seem useful to have unnecessary blank lines in the log.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ