Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7372027ybi; Mon, 8 Jul 2019 20:32:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqz8CJ2qQPLqNfBsD0AilAJvhPyBZZE6WzQHslZaezXd4Gg1g+wn7NTJRBoKNjOq0KDBEED6 X-Received: by 2002:a17:902:848b:: with SMTP id c11mr29047602plo.217.1562643170700; Mon, 08 Jul 2019 20:32:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562643170; cv=none; d=google.com; s=arc-20160816; b=Cd8S7BLZbqPh6i0QESoW7hwQ3fV5FQ5eHBwuK9uWByRs3wexAAb0B13QoX+UKumMYw yNwWtJaPsYev7l1SO17SV3hCnQC5LtCzb+s04clXc8N6l3Q09gUEQj/c6yMDS9AUJWG/ 2ng1k0Pq1W2AkOATFIjauFFS3IGSjhEpOmMyg/62bLu73bGHjhnxa6piZ/fRchmOkjjq S5FbxJAq5rCn/ZySEKpaeX16xUBYDZqU7tieumlmY7CB1F6BVA/d2A7155w8gV3dq2XQ fq20EES29JllO3TBolozNFOb435DlsgC4fUfIMPf8IkKBgxruF+hoCTNisEXlGw4Y7mt 5DrQ== 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=m91tz+L2xUjZ0v0r9OzoYiGDg9B69VASnNu6pYdAxEs=; b=EGCKN2fNcEW87mfBDxN91MYgdV77yViJA+LIENhvNoGJUGFqHiBXFrAmyLxuyqTKsJ gVwEYGQ+p5hGWCd60IOprJOFkoSObhBV327GKroO4zWHQ82ozJzYyZ57qGuX5NACisGe K43ot5YGuUSz4ghfMf5DvCJQZljVJEEf+B95biToQdSrYRKZI22kf3b8jCEpM1QFJ+ex 3ghvqLgiJePnblrQekj5pNETffo3fGiur9iXYsH2sXhzx5b0UcjGuqARauV5VXt08Y3E jl7hx314RTHFeoZC9O712MgLnnRAYYpFv7vZQlluY/kBk0xxBzeFGf5Xz8zsOinlxTBA 8evQ== 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 p23si19165236pgm.173.2019.07.08.20.32.35; Mon, 08 Jul 2019 20:32:50 -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 S1727599AbfGIDbz (ORCPT + 99 others); Mon, 8 Jul 2019 23:31:55 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:51598 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727278AbfGIDbe (ORCPT ); Mon, 8 Jul 2019 23:31:34 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 7BF10EEDB3371A83C5AB; 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 02/10] net: hisilicon: Cleanup for got restricted __be32 Date: Tue, 9 Jul 2019 11:31:03 +0800 Message-ID: <1562643071-46811-3-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: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