From patchwork Tue Nov 10 04:18:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 542144 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id DB56814031F for ; Tue, 10 Nov 2015 15:20:53 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id C1F631A067F for ; Tue, 10 Nov 2015 15:20:53 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.151]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 7A79F1A03ED for ; Tue, 10 Nov 2015 15:20:23 +1100 (AEDT) Received: from localhost by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 9 Nov 2015 21:20:21 -0700 Received: from d03dlp02.boulder.ibm.com (9.17.202.178) by e33.co.us.ibm.com (192.168.1.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 9 Nov 2015 21:20:18 -0700 X-IBM-Helo: d03dlp02.boulder.ibm.com X-IBM-MailFrom: stewart@linux.vnet.ibm.com X-IBM-RcptTo: skiboot@lists.ozlabs.org Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by d03dlp02.boulder.ibm.com (Postfix) with ESMTP id 84D493E4003B for ; Mon, 9 Nov 2015 21:20:18 -0700 (MST) Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tAA4KIKH64356462 for ; Mon, 9 Nov 2015 21:20:18 -0700 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tAA4KIEx015795 for ; Mon, 9 Nov 2015 21:20:18 -0700 Received: from oc8180480414.ibm.com ([9.81.198.226]) by d03av04.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with SMTP id tAA4KApf015454; Mon, 9 Nov 2015 21:20:17 -0700 Received: from ka1.ozlabs.ibm.com (localhost [127.0.0.1]) by oc8180480414.ibm.com (Postfix) with ESMTP id C0C4D5765; Tue, 10 Nov 2015 15:20:09 +1100 (AEDT) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Tue, 10 Nov 2015 15:18:14 +1100 Message-Id: <1447129110-21600-21-git-send-email-stewart@linux.vnet.ibm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1447129110-21600-1-git-send-email-stewart@linux.vnet.ibm.com> References: <1447129110-21600-1-git-send-email-stewart@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15111004-0009-0000-0000-00000F9E90B1 Subject: [Skiboot] [PATCH 20/36] sparse: fix endian conversion warnings in core/opal-msg.c X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" 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(-) diff --git a/core/opal-msg.c b/core/opal-msg.c index b0d8aaf7fa45..4a7cddb13bcc 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;