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 69C09C636CC for ; Wed, 15 Feb 2023 13:28:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229842AbjBON2h (ORCPT ); Wed, 15 Feb 2023 08:28:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229729AbjBON2f (ORCPT ); Wed, 15 Feb 2023 08:28:35 -0500 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BA2311EA2 for ; Wed, 15 Feb 2023 05:28:16 -0800 (PST) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4PGzQy1NXdz9sn8; Wed, 15 Feb 2023 14:27:54 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fsyq21zN4DBU; Wed, 15 Feb 2023 14:27:54 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4PGzNR6Mnzz9sqT; Wed, 15 Feb 2023 14:25:43 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 5AB8B8B7CD; Wed, 15 Feb 2023 13:53:57 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id EEvQFm2OXnqT; Wed, 15 Feb 2023 13:53:57 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (unknown [172.25.230.108]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 3C5E48B7CC; Wed, 15 Feb 2023 13:53:57 +0100 (CET) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 31FCrsbg217601 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 15 Feb 2023 13:53:54 +0100 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 31FCrsBe217600; Wed, 15 Feb 2023 13:53:54 +0100 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: Michael Ellerman , Nicholas Piggin Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v1 7/9] powerpc: Add ppc_md_progress() Date: Wed, 15 Feb 2023 13:53:36 +0100 Message-Id: <049b3f2407231564660b9cb8ef36384a0cad101a.1676465585.git.christophe.leroy@csgroup.eu> X-Mailer: git-send-email 2.39.1 In-Reply-To: <04ed69b4226633ab90983d7efb5bd4791078fe71.1676465585.git.christophe.leroy@csgroup.eu> References: <04ed69b4226633ab90983d7efb5bd4791078fe71.1676465585.git.christophe.leroy@csgroup.eu> MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1676465615; l=939; s=20211009; h=from:subject:message-id; bh=qu8ce5xc/w/8gWpE6wC0I2pyxDK1Vnlmz7EM6rQaC1w=; b=EpUeNVPi3+VhNWJJvo3YJnGfbDSMKwRgXaXzPUjpsGpbNOGYNBvb+KWmJpQcoR7qWlyLz0siXzAl Tql0hdqRC+fShSsfqYNQwCaHPdZDi+XWhbVezUBiAY4hWBUtfoXU X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Many places have: if (ppc.md_progress) ppc.md_progress(); Introduce ppc_md_progress() which will embedded the test. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/machdep.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h index c5dfe5ff923c..77e126e9cabc 100644 --- a/arch/powerpc/include/asm/machdep.h +++ b/arch/powerpc/include/asm/machdep.h @@ -234,6 +234,12 @@ static inline void log_error(char *buf, unsigned int err_type, int fatal) ppc_md.log_error(buf, err_type, fatal); } +static inline void ppc_md_progress(char *s, unsigned short hex) +{ + if (ppc_md.progress) + ppc_md.progress(s, hex); +} + #define __define_machine_initcall(mach, fn, id) \ static int __init __machine_initcall_##mach##_##fn(void) { \ if (machine_is(mach)) return fn(); \ -- 2.39.1