Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7371598ybi; Mon, 8 Jul 2019 20:32:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqxXRO4dEH2vKsNM2Q4eCnaY4cELl7ZnACX8la/FJFMvE+gMnHO/IrpIkYPHuKnd7ZpWHX0L X-Received: by 2002:a63:181:: with SMTP id 123mr19222034pgb.63.1562643139449; Mon, 08 Jul 2019 20:32:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562643139; cv=none; d=google.com; s=arc-20160816; b=yWCjzbsyjC7DVPuRAGhh/lEo9qJ3bBDUpeoD9Ylc1qhLqlA95NL+jri+2vS1emNH7G zOC0d3uOVkgm3VAQL2GN9nfsp+2onBJbwaCZqNQzXjqSCaYyqvwHXduu2S5jpcKGfnfi 7ZYPRC6819vN3QAhTagS6imAoglEq2ilPtw7ReukciN672Jgoe+cGkFl7Td3Jv2kEg/Q 7oWeyFh49lSM4ugkhWREyJlXHmicJEGyIGJXsKodlH59cK2uxctwJzXpgqnR8wnvW0wK uLWi5wmO0Tmz8AQmysBIn0bmzprYtEGwTRQxVhpNLJnQoZZOBphaN+cA/WrSGXAXH0oH IoYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=7M1PgAtbOqyUfhhT7uaWWSuPdJCZUxKGEIxPVB6L7+w=; b=WmEkExMhiI7h30IvBMSQ8NKUPDEBWlb9YSDsHBjWnqhx+6dUk2ZNUeImeUTSs4Svk/ YjhisGiBMFCypqHDoJEL7QWntoJRW4VcKrG8Sffk4tyU01jE2rzORRZKS9+upN2aBE6Z hGdhsSQb3/7SsIVoypu/nsiww7LqaZEJxDXawuplov0IlY7c26i7N8MYP6kA9R89wPQV RjYscj/XBeXtERgbtOTBMeqtMSWxtafiixacNpuUDxjm1P7+gcKOYn4Xtchcx4Rxjkej V8/9HjLxr/tIa4gzKShRO9fcQ3WjM19IUs4u9grVR1ZOTiZEMDdc8F2Y3pY0ODF7qhlU CJag== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j23si19520117pff.159.2019.07.08.20.32.04; Mon, 08 Jul 2019 20:32:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727392AbfGIDbf (ORCPT + 99 others); Mon, 8 Jul 2019 23:31:35 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:51558 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726294AbfGIDbb (ORCPT ); Mon, 8 Jul 2019 23:31:31 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 8C2E6A83445D307F6E29; Tue, 9 Jul 2019 11:31:29 +0800 (CST) Received: from huawei.com (10.67.189.167) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.439.0; Tue, 9 Jul 2019 11:31:21 +0800 From: Jiangfeng Xiao To: , , , , , , CC: , , , , , , Subject: [PATCH v2 03/10] net: hisilicon: Cleanup for cast to restricted __be32 Date: Tue, 9 Jul 2019 11:31:04 +0800 Message-ID: <1562643071-46811-4-git-send-email-xiaojiangfeng@huawei.com> X-Mailer: git-send-email 1.8.5.6 In-Reply-To: <1562643071-46811-1-git-send-email-xiaojiangfeng@huawei.com> References: <1562643071-46811-1-git-send-email-xiaojiangfeng@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.189.167] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch fixes the following warning from sparse: hip04_eth.c:533:23: warning: cast to restricted __be16 hip04_eth.c:533:23: warning: cast to restricted __be16 hip04_eth.c:533:23: warning: cast to restricted __be16 hip04_eth.c:533:23: warning: cast to restricted __be16 hip04_eth.c:534:23: warning: cast to restricted __be32 hip04_eth.c:534:23: warning: cast to restricted __be32 hip04_eth.c:534:23: warning: cast to restricted __be32 hip04_eth.c:534:23: warning: cast to restricted __be32 hip04_eth.c:534:23: warning: cast to restricted __be32 hip04_eth.c:534:23: warning: cast to restricted __be32 Signed-off-by: Jiangfeng Xiao --- drivers/net/ethernet/hisilicon/hip04_eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c index 31f13cf..d8f0619 100644 --- a/drivers/net/ethernet/hisilicon/hip04_eth.c +++ b/drivers/net/ethernet/hisilicon/hip04_eth.c @@ -530,8 +530,8 @@ static int hip04_rx_poll(struct napi_struct *napi, int budget) priv->rx_phys[priv->rx_head] = 0; desc = (struct rx_desc *)skb->data; - len = be16_to_cpu(desc->pkt_len); - err = be32_to_cpu(desc->pkt_err); + len = be16_to_cpu((__force __be16)desc->pkt_len); + err = be32_to_cpu((__force __be32)desc->pkt_err); if (0 == len) { dev_kfree_skb_any(skb); -- 1.8.5.6