From: Joe Perches <joe@perches.com>
To: "Christophe Leroy" <christophe.leroy@csgroup.eu>,
"Pali Rohár" <pali@kernel.org>,
"Michael Ellerman" <mpe@ellerman.id.au>,
"Nicholas Piggin" <npiggin@gmail.com>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2 09/10] powerpc: Use ppc_md_progress()
Date: Sat, 18 Feb 2023 06:54:11 -0800 [thread overview]
Message-ID: <45807c0e9fc818dd433746fbb55988c73b016477.camel@perches.com> (raw)
In-Reply-To: <c4416002503fa19e930bc78177bb85641367c40f.1676711562.git.christophe.leroy@csgroup.eu>
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.
next prev parent reply other threads:[~2023-02-18 14:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-18 9:15 [PATCH v2 01/10] powerpc/machdep: Make machine name const Christophe Leroy
2023-02-18 9:15 ` [PATCH v2 02/10] powerpc/machdep: Define 'compatible' property in ppc_md and use it Christophe Leroy
2023-02-18 9:15 ` [PATCH v2 03/10] powerpc/platforms: Use 'compatible' property for simple cases Christophe Leroy
2023-02-18 9:15 ` [PATCH v2 04/10] powerpc/47x: Split ppc47x machine in two Christophe Leroy
2023-02-18 9:15 ` [PATCH v2 05/10] powerpc/gamecube|wii : Use machine_device_initcall() Christophe Leroy
2023-02-18 9:15 ` [PATCH v2 06/10] powerpc/85xx: Fix function naming for p1023_rdb platform Christophe Leroy
2023-02-18 9:15 ` [PATCH v2 07/10] powerpc: Make generic_calibrate_decr() the default Christophe Leroy
2023-02-18 9:15 ` [PATCH v2 08/10] powerpc: Add ppc_md_progress() Christophe Leroy
2023-02-18 9:15 ` [PATCH v2 09/10] powerpc: Use ppc_md_progress() Christophe Leroy
2023-02-18 14:54 ` Joe Perches [this message]
2023-02-20 0:42 ` Michael Ellerman
2023-02-18 9:15 ` [PATCH v2 10/10] powerpc/85xx: Don't check ppc_md.progress in mpc85xx_cds_setup_arch() Christophe Leroy
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=45807c0e9fc818dd433746fbb55988c73b016477.camel@perches.com \
--to=joe@perches.com \
--cc=christophe.leroy@csgroup.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=pali@kernel.org \
/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®