From patchwork Tue Nov 10 04:18:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 542156 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 E70B614031F for ; Tue, 10 Nov 2015 15:21:57 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id C0A701A027B for ; Tue, 10 Nov 2015 15:21:57 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 7F0DE1A0410 for ; Tue, 10 Nov 2015 15:20:37 +1100 (AEDT) Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 9 Nov 2015 23:20:34 -0500 Received: from d01dlp03.pok.ibm.com (9.56.250.168) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 9 Nov 2015 23:20:33 -0500 X-IBM-Helo: d01dlp03.pok.ibm.com X-IBM-MailFrom: stewart@linux.vnet.ibm.com X-IBM-RcptTo: skiboot@lists.ozlabs.org Received: from b01cxnp22035.gho.pok.ibm.com (b01cxnp22035.gho.pok.ibm.com [9.57.198.25]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id 03774C90057 for ; Mon, 9 Nov 2015 23:08:43 -0500 (EST) Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id tAA4KWCB57082028 for ; Tue, 10 Nov 2015 04:20:32 GMT Received: from d01av02.pok.ibm.com (localhost [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id tAA4KWWG030309 for ; Mon, 9 Nov 2015 23:20:32 -0500 Received: from oc8180480414.ibm.com ([9.81.198.226]) by d01av02.pok.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with SMTP id tAA4KKkk029520; Mon, 9 Nov 2015 23:20:31 -0500 Received: from ka1.ozlabs.ibm.com (localhost [127.0.0.1]) by oc8180480414.ibm.com (Postfix) with ESMTP id 2F01B576A; Tue, 10 Nov 2015 15:20:12 +1100 (AEDT) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Tue, 10 Nov 2015 15:18:19 +1100 Message-Id: <1447129110-21600-26-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-0041-0000-0000-000002497476 Subject: [Skiboot] [PATCH 25/36] sparse: fix beint16_t degrades to int in hdata/hdif.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" Do the comparison in host endian rather than big endian to silence sparse hdata/hdif.c:25:16: warning: restricted beint16_t degrades to integer Signed-off-by: Stewart Smith --- hdata/hdif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hdata/hdif.c b/hdata/hdif.c index 916b4ddaceb5..25c00008138f 100644 --- a/hdata/hdif.c +++ b/hdata/hdif.c @@ -22,7 +22,7 @@ const void *HDIF_get_idata(const struct HDIF_common_hdr *hdif, unsigned int di, const struct HDIF_common_hdr *hdr = hdif; const struct HDIF_idata_ptr *iptr; - if (hdr->d1f0 != BE16_TO_CPU(0xd1f0)) { + if (be16_to_cpu(hdr->d1f0) != 0xd1f0) { prerror("HDIF: Bad header format !\n"); return NULL; }