Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2978488ybi; Thu, 4 Jul 2019 23:34:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqwWQ6mKvFVQBcV5DdUNP6xLVwy4ToS+DNUirMgGRmeSVhIg4z+StP81EfDqfTm42N/+lHGe X-Received: by 2002:a63:2ec9:: with SMTP id u192mr3092094pgu.16.1562308463564; Thu, 04 Jul 2019 23:34:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562308463; cv=none; d=google.com; s=arc-20160816; b=mHbpU0CGdzabz9LOE1gIgPuQ/BmMG4dIXRhIjdsEvKaxbTfd72PcboWAqXlJJoKJTL RN6M5wOLizlqLYo4iAWObK0/cRvY/b3wbdDurScDu2yUtMy1Tj0up8tn5ibORs+3uWSU kBT//FFCl96JkUKXIfUSKdpFY0VlRe6CHR3AyVyKwxM8N12ZxOjK2SXEd0KNV6hosQKc 7hs5F5T3JWAXhK722R6UPm/iHi4M0HWN1V72EqmZrI/wB2zR5ovwGf+en7i40zCwK9yk 2iicmP+EdQnx0q99daMtCxScVIHjOQv924DMrkkE+uM6WEzqcmtwnqj7A4A/3PPVTsf4 ekTg== 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=m91tz+L2xUjZ0v0r9OzoYiGDg9B69VASnNu6pYdAxEs=; b=lcFFOHezB4OnxCRyuoyYsga14WNkrA9GKNx7jGr+68uJerm41RbnkX4jnm0Yq3KNag 6I/YjCm0F7yOjSz2pArpHui8vGjkXRKia+/Lq2MYLE9wi5nI31bLhZENB7y8UOYDB825 S6dGwoZrRZU0W+zIHMyhIP3FTMDx/Im8WrCZJH04yDEqrpkDjAmCOozq9//zecIjIzEY jn1d9Svjrm65Tsz53rMJFdnJnJrvDX28UqT+QaJOpAEL/NF6l0bSTYJLwNGExnjlQqC+ gohrH5i8Uz4gbibFOOCrveGEoNbdjUH/NiD8LoaS4vitkHvUlIipdkzrig4vU2e+/IhU GFig== 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 cn1si7967626plb.204.2019.07.04.23.34.08; Thu, 04 Jul 2019 23:34:23 -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 S1727690AbfGEGK7 (ORCPT + 99 others); Fri, 5 Jul 2019 02:10:59 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:44644 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725772AbfGEGK7 (ORCPT ); Fri, 5 Jul 2019 02:10:59 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 6BCCC188B2DA79EDC3BB; Fri, 5 Jul 2019 14:10:57 +0800 (CST) Received: from huawei.com (10.67.189.167) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Fri, 5 Jul 2019 14:10:50 +0800 From: Jiangfeng Xiao To: , , , CC: , , , , , , , , , Subject: [PATCH 02/10] net: hisilicon: Cleanup for got restricted __be32 Date: Fri, 5 Jul 2019 14:10:44 +0800 Message-ID: <1562307044-103602-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:468:25: warning: incorrect type in assignment hip04_eth.c:468:25: expected unsigned int [usertype] send_addr hip04_eth.c:468:25: got restricted __be32 [usertype] hip04_eth.c:469:25: warning: incorrect type in assignment hip04_eth.c:469:25: expected unsigned int [usertype] send_size hip04_eth.c:469:25: got restricted __be32 [usertype] hip04_eth.c:470:19: warning: incorrect type in assignment hip04_eth.c:470:19: expected unsigned int [usertype] cfg hip04_eth.c:470:19: got restricted __be32 [usertype] hip04_eth.c:472:23: warning: incorrect type in assignment hip04_eth.c:472:23: expected unsigned int [usertype] wb_addr hip04_eth.c:472:23: got restricted __be32 [usertype] Signed-off-by: Jiangfeng Xiao --- drivers/net/ethernet/hisilicon/hip04_eth.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c index 2b5112b..31f13cf 100644 --- a/drivers/net/ethernet/hisilicon/hip04_eth.c +++ b/drivers/net/ethernet/hisilicon/hip04_eth.c @@ -465,11 +465,11 @@ static void hip04_start_tx_timer(struct hip04_priv *priv) priv->tx_skb[tx_head] = skb; priv->tx_phys[tx_head] = phys; - desc->send_addr = cpu_to_be32(phys); - desc->send_size = cpu_to_be32(skb->len); - desc->cfg = cpu_to_be32(TX_CLEAR_WB | TX_FINISH_CACHE_INV); + desc->send_addr = (__force u32)cpu_to_be32(phys); + desc->send_size = (__force u32)cpu_to_be32(skb->len); + desc->cfg = (__force u32)cpu_to_be32(TX_CLEAR_WB | TX_FINISH_CACHE_INV); phys = priv->tx_desc_dma + tx_head * sizeof(struct tx_desc); - desc->wb_addr = cpu_to_be32(phys); + desc->wb_addr = (__force u32)cpu_to_be32(phys); skb_tx_timestamp(skb); hip04_set_xmit_desc(priv, phys); -- 1.8.5.6