From 9d8d4e4d9e3e3663d9fbdab5b3a1863f485efe4f Mon Sep 17 00:00:00 2001 From: Stewart Smith Date: Tue, 10 Nov 2015 09:49:49 +1100 Subject: sparse: fix endian conversion warnings in core/opal-msg.c No resulting code changes due to skiboot being all BE core/opal-msg.c:58:29: warning: incorrect type in assignment (different base types) core/opal-msg.c:58:29: expected restricted beint32_t [usertype] msg_type core/opal-msg.c:58:29: got int enum opal_msg_type [signed] msg_type core/opal-msg.c:120:50: warning: restricted beint64_t degrades to integer Signed-off-by: Stewart Smith --- core/opal-msg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/opal-msg.c') diff --git a/core/opal-msg.c b/core/opal-msg.c index b0d8aaf..4a7cddb 100644 --- a/core/opal-msg.c +++ b/core/opal-msg.c @@ -55,7 +55,7 @@ int _opal_queue_msg(enum opal_msg_type msg_type, void *data, entry->consumed = consumed; entry->data = data; - entry->msg.msg_type = msg_type; + entry->msg.msg_type = cpu_to_be32(msg_type); if (num_params > ARRAY_SIZE(entry->msg.params)) { prerror("Discarding extra parameters\n"); @@ -117,7 +117,7 @@ static int64_t opal_check_completion(uint64_t *buffer, uint64_t size, lock(&opal_msg_lock); list_for_each_safe(&msg_pending_list, entry, next_entry, link) { if (entry->msg.msg_type == OPAL_MSG_ASYNC_COMP && - entry->msg.params[0] == token) { + be64_to_cpu(entry->msg.params[0]) == token) { list_del(&entry->link); callback = entry->consumed; data = entry->data; -- cgit v1.1