@@ -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;
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 <stewart@linux.vnet.ibm.com> --- core/opal-msg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)