diff mbox series

[v2,08/10] powerpc: Add ppc_md_progress()

Message ID 01d6c5351eaabfe4dca0c930bda47985389346f7.1676711562.git.christophe.leroy@csgroup.eu (mailing list archive)
State Changes Requested
Headers show
Series [v2,01/10] powerpc/machdep: Make machine name const | expand

Commit Message

Christophe Leroy Feb. 18, 2023, 9:15 a.m. UTC
Many places have:

	if (ppc.md_progress)
		ppc.md_progress();

Introduce ppc_md_progress() which will embedded the test.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
 arch/powerpc/include/asm/machdep.h | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h
index 4f6e7d7ee388..b9a21ec54d1c 100644
--- a/arch/powerpc/include/asm/machdep.h
+++ b/arch/powerpc/include/asm/machdep.h
@@ -240,6 +240,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(); \