[Skiboot] [PATCH 08/10] sparse: hdata/iohub: correctly convert endianness

Stewart Smith stewart at linux.ibm.com
Thu Jul 18 16:51:15 AEST 2019


hdata/iohub.c:723:22: warning: restricted beint16_t degrades to integer

Signed-off-by: Stewart Smith <stewart at linux.ibm.com>
---
 hdata/iohub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hdata/iohub.c b/hdata/iohub.c
index c81dc5e46188..b0ef0c3d721a 100644
--- a/hdata/iohub.c
+++ b/hdata/iohub.c
@@ -720,7 +720,7 @@ static void io_parse_slots(const struct HDIF_common_hdr *sp_iohubs, int hub_id)
 	const struct slot_map_entry *entry;
 	unsigned int i, count;
 
-	if (sp_iohubs->child_count <= CECHUB_CHILD_IOSLOTS)
+	if (be16_to_cpu(sp_iohubs->child_count) <= CECHUB_CHILD_IOSLOTS)
 		return;
 
 	ioslot_arr = HDIF_child_arr(sp_iohubs, CECHUB_CHILD_IOSLOTS);
-- 
2.21.0



More information about the Skiboot mailing list