diff mbox series

hdat: fix parsing of P8 hdat

Message ID 20170918022523.16131-1-stewart@linux.vnet.ibm.com
State Accepted
Headers show
Series hdat: fix parsing of P8 hdat | expand

Commit Message

Stewart Smith Sept. 18, 2017, 2:25 a.m. UTC
Also fixes hdat_to_dt test cases.

Fixes: ad484081ef8a51811e7902aec436fa8f1ca9604a
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
---
 hdata/iohub.c      | 7 ++-----
 hdata/test/stubs.c | 2 +-
 2 files changed, 3 insertions(+), 6 deletions(-)

Comments

Stewart Smith Sept. 18, 2017, 2:59 a.m. UTC | #1
Stewart Smith <stewart@linux.vnet.ibm.com> writes:
> Also fixes hdat_to_dt test cases.
>
> Fixes: ad484081ef8a51811e7902aec436fa8f1ca9604a
> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>

Merged to master as of 6f3c61974738e2d75c94d3fa5988b148389854ce
diff mbox series

Patch

diff --git a/hdata/iohub.c b/hdata/iohub.c
index 567ab5971231..4c4178da2d35 100644
--- a/hdata/iohub.c
+++ b/hdata/iohub.c
@@ -798,8 +798,6 @@  static void io_parse_slots(const void *sp_iohubs, int hub_id)
 	const struct slot_map_entry *entry;
 	unsigned int i, count;
 
-	dt_slots = get_slot_node();
-
 	ioslot_arr = HDIF_child_arr(sp_iohubs, CECHUB_CHILD_IOSLOTS);
 	if (!ioslot_arr)
 		return;
@@ -808,6 +806,8 @@  static void io_parse_slots(const void *sp_iohubs, int hub_id)
 	if (!count)
 		return;
 
+	dt_slots = get_slot_node();
+
 	prlog(PR_DEBUG, "CEC: Found slot map for IOHUB %d\n", hub_id);
 	if (count > 1)
 		prerror("CEC: Multiple IOSLOTs found for IO HUB %d\n", hub_id);
@@ -846,9 +846,6 @@  static void io_parse_fru(const void *sp_iohubs)
 		unsigned int size, hub_id;
 		uint32_t chip_id;
 
-		if(i > 0)
-			break;
-
 		hub = HDIF_get_iarray_item(sp_iohubs, CECHUB_FRU_IO_HUBS,
 					   i, &size);
 		if (!hub || size < CECHUB_IOHUB_MIN_SIZE) {
diff --git a/hdata/test/stubs.c b/hdata/test/stubs.c
index cb166f97516c..abeb832d2abc 100644
--- a/hdata/test/stubs.c
+++ b/hdata/test/stubs.c
@@ -97,7 +97,6 @@  STUB(op_display);
 STUB(fsp_preload_lid);
 STUB(fsp_wait_lid_loaded);
 STUB(fsp_adjust_lid_side);
-STUB(backtrace);
 
 /* Add HW specific stubs here */
 static bool true_stub(void) { return true; }
@@ -117,4 +116,5 @@  NOOP_STUB(mem_reserve_fw);
 NOOP_STUB(mem_reserve_hwbuf);
 NOOP_STUB(add_chip_dev_associativity);
 NOOP_STUB(enable_mambo_console);
+NOOP_STUB(backtrace);