aboutsummaryrefslogtreecommitdiff
path: root/hdata/memory.c
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-11-09 18:09:26 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-11-09 18:09:26 +1100
commitec2aeb82d38d37ebdd97f06dd3db5d55a2fe6876 (patch)
treeae8439c5b0cb3ea226855844ed8201ffae9ca587 /hdata/memory.c
parent5c3e642911ed217bc476478694281a89fe8ef73c (diff)
downloadskiboot-ec2aeb82d38d37ebdd97f06dd3db5d55a2fe6876.zip
skiboot-ec2aeb82d38d37ebdd97f06dd3db5d55a2fe6876.tar.gz
skiboot-ec2aeb82d38d37ebdd97f06dd3db5d55a2fe6876.tar.bz2
sparse: fix endian annotations in hdata/memory.c
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@linux.vnet.ibm.com>
Diffstat (limited to 'hdata/memory.c')
-rw-r--r--hdata/memory.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hdata/memory.c b/hdata/memory.c
index 58acd63..e90f9de 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);
}