[Skiboot] [PATCH 2/3] hdata: Add no-op stub functions

Oliver O'Halloran oohall at gmail.com
Mon May 15 18:20:49 AEST 2017


These are useful for side-stepping various HW specific functions.

Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
 hdata/test/stubs.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/hdata/test/stubs.c b/hdata/test/stubs.c
index bde19e167c18..8bbc68b51500 100644
--- a/hdata/test/stubs.c
+++ b/hdata/test/stubs.c
@@ -99,6 +99,12 @@ STUB(op_display);
 STUB(fsp_preload_lid);
 STUB(fsp_wait_lid_loaded);
 STUB(fsp_adjust_lid_side);
-STUB(mem_reserve_hw);
-STUB(early_uart_init);
 STUB(backtrace);
+
+/* Add HW specific stubs here */
+static void noop_function(void) {}
+#define NOOP_STUB(fnname) \
+	void fnname(void) __attribute__((weak, alias ("noop_function")))
+
+NOOP_STUB(early_uart_init);
+NOOP_STUB(mem_reserve_hw);
-- 
2.9.3



More information about the Skiboot mailing list