Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2959789ybi; Thu, 4 Jul 2019 23:12:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwZk3eTF/jMI4zx4fsCi6Dny38E82nOowZ3BrjEwEDZPlatybY2xMm+9mILQMx/9YPaulTP X-Received: by 2002:a17:90a:8c0c:: with SMTP id a12mr2744619pjo.67.1562307134106; Thu, 04 Jul 2019 23:12:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562307134; cv=none; d=google.com; s=arc-20160816; b=A+UAv4kepSy4FCJ8RlB7xADeyBnXw199MF5WMnhlgzgclX6J+9YTkIFLtHPV/YMirT US9vJv2QYxrPrgZbSmb7a969EMo1yHUqEdJCsFEqgMPRvNLQbC3DqneuJ/ulDFddEMCV nEfXor3YlNm4JAltAMgRIFsUYc4vyEbt6P+PyCUSvwIDV25XJ6FfLqaob5xa0H904qJP L6ljg7f7vGOCCps19eba8+Foxh6XKP/w0boAGK1lwToKYHN/8xwCzIsO+9F7hLPSAVht AyzywGiexie04/E9TqInA0LckhAwVeThUxSAQ/Yof6LUpFW6S+qDK7RjoRrJGpGgbQqW NeXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=7M1PgAtbOqyUfhhT7uaWWSuPdJCZUxKGEIxPVB6L7+w=; b=a79rPBkZJ86C+FtPgv/aYFX4kLKKOINgfK+lC6UqANS2Hr+Cz4wqWRQL415VQ1eL+J lFGQhXAbkZZja6NiIaHni8NPDcnSzdDKSPadGrQZbvHswqdBJJEJk0ErXTg0Ik33Nw7a 5PnwGKHeRVxI+Ptf+fyIHr4qK/3Pn4A11ySoWFbagUSQoNCcQxEUj/kcMzT5+gFZKTrw /Mordg9wDGoxM3Q+JQ83KT59dW+ahZ7R3HuI0sDJ1O4zkllM/kaMTrTGMOqKFR8mgt1c cPs0Vqcj3BTQYFEbJmFbRCic2pB2sPshdvirPwiP0FBxXVovPmtNVRH+9PKTdtFqU7fl IAIg== 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 21si7765147pfo.138.2019.07.04.23.11.59; Thu, 04 Jul 2019 23:12:14 -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 S1727749AbfGEGLN (ORCPT + 99 others); Fri, 5 Jul 2019 02:11:13 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:44788 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725772AbfGEGLN (ORCPT ); Fri, 5 Jul 2019 02:11:13 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 3CF5090D64F6A7756C51; Fri, 5 Jul 2019 14:11:11 +0800 (CST) Received: from huawei.com (10.67.189.167) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.439.0; Fri, 5 Jul 2019 14:11:05 +0800 From: Jiangfeng Xiao To: , , , CC: , , , , , , , , , Subject: [PATCH 03/10] net: hisilicon: Cleanup for cast to restricted __be32 Date: Fri, 5 Jul 2019 14:10:59 +0800 Message-ID: <1562307059-103641-1-git-send-email-xiaojiangfeng@huawei.com> X-Mailer: git-send-email 1.8.5.6 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