Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp400574ybm; Thu, 28 May 2020 05:51:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqI8cApUiBQcgzIaH3ZKGN6pI2tUpGoaK1dQxDOOcnNLBVEGr1MP2tYFM1evI4Omdqg21D X-Received: by 2002:a17:906:4442:: with SMTP id i2mr3023737ejp.509.1590670270034; Thu, 28 May 2020 05:51:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590670270; cv=none; d=google.com; s=arc-20160816; b=r45/bury2Bq0opS4TBIaWk6I6rAsNwuFy5NYX4eQ9xK/oAL9kymRibH3BD/8uLK/Jg uuePxn4q1Dgg2UIsZatKBtyX4VSIj05EIUoZzZDI+TJwpmk/6k2PxnOyC/gnPuZRB94I yPO7v/cJIEcihbMiDwzAjGhFKhbzIxQmualJ3Xtu4RiA4M2gYaRHQTKsPopD6CaElqF1 pmj+48aXYRuf271+IqzGMcevYdwy8yrUrgYnbaeN5bo3drYfA9ubZdmBtSoNeVRtjl/+ tPYcV0KP1ROtXkM9Xje7uyWiG471zXpVOSVH3WeSkbjdAyG//H6KIGzH6SgcZ5kM8Ym1 9cOg== 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=oCKxOad5z8G+rmkJS0vTO5BJ2acq5Nw8Xl9uc8j4qxA=; b=xc1gqvXyaPD8r7ReFsHcwb1xTTsV2cOt7QW9szygjAHr4PkTvpnwBIiTvPsl2CBvJC Z2j1GEIX0taRubxPUIo7Pkrh4bQLCXlNCU02IZLEgLeoNB4spNnXRFe4ZbdAhdcc5dbc xzSHc/ePdNPgmzB07CGavEzpejdFulti2frcCJTxkC8ageKCvNP6jrDVIfS3Fy9CsBnd 7tOgTGBgMqZena4pjRyg+AXQTraEqCsBA1io5lzs08MSiYgjZs+woY9QzNps3eiXq4jT gUAdt4nW7SHcp6hcEhg5MbQGyNfmsBjq7g9d9lI3uAfJjCutfqgBRsdhgY7Yav2h1526 hcEQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h16si4609421edj.301.2020.05.28.05.50.47; Thu, 28 May 2020 05:51:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389901AbgE1Mq5 (ORCPT + 99 others); Thu, 28 May 2020 08:46:57 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:5363 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389783AbgE1Mqr (ORCPT ); Thu, 28 May 2020 08:46:47 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 346702F7B95CB506CC26; Thu, 28 May 2020 20:46:43 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Thu, 28 May 2020 20:46:36 +0800 From: Huazhong Tan To: CC: , , , , , , Huazhong Tan Subject: [PATCH net-next 02/11] net: hns3: refactor hclge_config_tso() Date: Thu, 28 May 2020 20:45:03 +0800 Message-ID: <1590669912-21867-3-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1590669912-21867-1-git-send-email-tanhuazhong@huawei.com> References: <1590669912-21867-1-git-send-email-tanhuazhong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since parameters 'tso_mss_min' and 'tso_mss_max' only indicate the minimum and maximum MSS, the hnae3_set_field() calls are meaningless, remove them and change the type of these two parameters to u16. Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index ff8ad4b..21ad23e 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -1429,26 +1429,17 @@ static int hclge_configure(struct hclge_dev *hdev) return ret; } -static int hclge_config_tso(struct hclge_dev *hdev, unsigned int tso_mss_min, - unsigned int tso_mss_max) +static int hclge_config_tso(struct hclge_dev *hdev, u16 tso_mss_min, + u16 tso_mss_max) { struct hclge_cfg_tso_status_cmd *req; struct hclge_desc desc; - u16 tso_mss; hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_TSO_GENERIC_CONFIG, false); req = (struct hclge_cfg_tso_status_cmd *)desc.data; - - tso_mss = 0; - hnae3_set_field(tso_mss, HCLGE_TSO_MSS_MIN_M, - HCLGE_TSO_MSS_MIN_S, tso_mss_min); - req->tso_mss_min = cpu_to_le16(tso_mss); - - tso_mss = 0; - hnae3_set_field(tso_mss, HCLGE_TSO_MSS_MIN_M, - HCLGE_TSO_MSS_MIN_S, tso_mss_max); - req->tso_mss_max = cpu_to_le16(tso_mss); + req->tso_mss_min = cpu_to_le16(tso_mss_min); + req->tso_mss_max = cpu_to_le16(tso_mss_max); return hclge_cmd_send(&hdev->hw, &desc, 1); } -- 2.7.4