From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09D16C636CC for ; Sat, 18 Feb 2023 14:54:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229634AbjBROyS convert rfc822-to-8bit (ORCPT ); Sat, 18 Feb 2023 09:54:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229477AbjBROyR (ORCPT ); Sat, 18 Feb 2023 09:54:17 -0500 Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BDA015CA7 for ; Sat, 18 Feb 2023 06:54:15 -0800 (PST) Received: from omf03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id A0BF6C01DD; Sat, 18 Feb 2023 14:54:14 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf03.hostedemail.com (Postfix) with ESMTPA id 76A146000A; Sat, 18 Feb 2023 14:54:12 +0000 (UTC) Message-ID: <45807c0e9fc818dd433746fbb55988c73b016477.camel@perches.com> Subject: Re: [PATCH v2 09/10] powerpc: Use ppc_md_progress() From: Joe Perches To: Christophe Leroy , Pali =?ISO-8859-1?Q?Roh=E1r?= , Michael Ellerman , Nicholas Piggin Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Sat, 18 Feb 2023 06:54:11 -0800 In-Reply-To: References: <6cb9865d916231c38401ba34ad1a98c249fae135.1676711562.git.christophe.leroy@csgroup.eu> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-Rspamd-Queue-Id: 76A146000A X-Stat-Signature: ko8ekdn8kgjoy13z5nmwfcoyx7qqiza7 X-Rspamd-Server: rspamout02 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX19KzBUQ62SvQ99BfK/AxzAcNZNwaOmCbag= X-HE-Tag: 1676732052-331222 X-HE-Meta: U2FsdGVkX1/DZbqqps+9kd6q64cfiK8UA5TaayzVMfWlIQ4jprjRTx98Jt36YWCNM9F6tpM7eyvK3vrd0PmYCg== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.