[Skiboot] [PATCH 28/36] sparse: fix missing endian conversion in hdif pointer

Stewart Smith stewart at linux.vnet.ibm.com
Tue Nov 10 15:18:22 AEDT 2015


No code change for skiboot as skiboot is BE

hdata/spira.c:43:21: warning: incorrect type in initializer (different base types)
hdata/spira.c:43:21:    expected restricted beint32_t [usertype] size
hdata/spira.c:43:21:    got int
hdata/spira.c:57:20: warning: incorrect type in initializer (different base types)
hdata/spira.c:57:20:    expected restricted beint32_t [usertype] size
hdata/spira.c:57:20:    got unsigned long
hdata/spira.c:108:24: warning: incorrect type in initializer (different base types)
hdata/spira.c:108:24:    expected restricted beint32_t [usertype] size
hdata/spira.c:108:24:    got unsigned long

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

diff --git a/hdata/hdif.h b/hdata/hdif.h
index fad74543d5ca..ef03522aca8b 100644
--- a/hdata/hdif.h
+++ b/hdata/hdif.h
@@ -73,7 +73,7 @@ struct HDIF_child_ptr {
 #define HDIF_IDATA_PTR(_offset, _size)			\
 {							\
 	.offset	= CPU_TO_BE32(_offset),			\
-	.size	= _size,				\
+	.size	= CPU_TO_BE32(_size),			\
 }
 
 static inline bool HDIF_check(const void *hdif, const char id[])
-- 
2.1.4



More information about the Skiboot mailing list