[Skiboot] [PATCH 13/36] sparse: fix endian annotations in hdata/memory.c

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


No resulting code changes as we're all BE for now.

hdata/memory.c:106:34: warning: incorrect type in argument 1 (different base types)
hdata/memory.c:106:34:    expected restricted beint32_t [usertype] be_val
hdata/memory.c:106:34:    got unsigned int [unsigned] [usertype] <noident>
hdata/memory.c:113:16: warning: incorrect type in assignment (different base types)
hdata/memory.c:113:16:    expected unsigned int [unsigned] [usertype] <noident>
hdata/memory.c:113:16:    got restricted beint32_t

Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
 hdata/memory.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/hdata/memory.c b/hdata/memory.c
index 58acd6329e28..e90f9de142b8 100644
--- a/hdata/memory.c
+++ b/hdata/memory.c
@@ -93,13 +93,13 @@ static void append_chip_id(struct dt_node *mem, u32 id)
 {
 	struct dt_property *prop;
 	size_t len, i;
-	u32 *p;
+	be32 *p;
 
 	prop = __dt_find_property(mem, "ibm,chip-id");
 	if (!prop)
 		return;
 	len = prop->len >> 2;
-	p = (u32 *)prop->prop;
+	p = (be32*)prop->prop;
 
 	/* Check if it exists already */
 	for (i = 0; i < len; i++) {
@@ -109,7 +109,7 @@ static void append_chip_id(struct dt_node *mem, u32 id)
 
 	/* Add it to the list */
 	dt_resize_property(&prop, (len + 1) << 2);
-	p = (u32 *)prop->prop;
+	p = (be32 *)prop->prop;
 	p[len] = cpu_to_be32(id);
 }
 
-- 
2.1.4



More information about the Skiboot mailing list