Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp446083ybm; Thu, 28 May 2020 06:55:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYRh4UFrKVGoB+BLYHspHArJlnZFt4eDmuAa3NMtVT+Z4Wo1gQRSQdRrGIBPDmqLC/qoAP X-Received: by 2002:a05:6402:14d3:: with SMTP id f19mr3095512edx.135.1590674144359; Thu, 28 May 2020 06:55:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590674144; cv=none; d=google.com; s=arc-20160816; b=ix5WjVEO2plsy2rNVx669UY8UAEItljv2R5bS4Vc2eiCXDn8P4dnCLhtwSaG3px20Y ITvVR9kYxbBOERN3VRSkqNvAobssyrwIWvxQY1RlgTaS+hDHKZinUxzVW+ifb8PbMK8R tpWS6W5Fqt52uzBdEhlOIM3tBAUiBZnLEay25tvuOAKFdXuMZJ2UOE9ePfqfTu+vypxt ikH6lPB/Zplhv5whfzSEs8XDDO408sWsvILrWabttz/JHd7fic1oL7HQ0ZnfxLrT4Yic q0kcevgtH9YlKk3BetoVGovfCFX+6tncMa1eoGc4LbKZJZ4Dboh3/ofchaUSSNbzid3t +DCw== 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=jYfkXSYUBUJkEffchUAdT6gB04wHqMc3MN8SjC5LLLc=; b=uKqPmt6whuy7kzDEnLEkFp0z3efEsBbUZqPjd/hwSz+3oVNs5rky6QWr2v6hQu6C9B xaHdw46Mjfm9rFcAdqsWcjd8dqdMLAzgRdA+B3uhZ7ep7tc0BJFA+4sefcv/t19NhEIU 48f2rOriFwKpf8zVv9oWcPghKxYjv5W4Ip0nhZB5P9b7F+sh8y7i7fDAbK16W8/6tqBi 2pH/4RYq459IJJK+A47tek1WcsX3bOCVvDUzRnVZqbfbdsmi6CSFQjwiBZ6mIsXfCAzI rjyeJ6kTD1Do1HNLwYam2JxwEgn2Ix9IuETipfuGIwkl5Bt9uQmsj3OT7zEpAIIZAzFb aPbA== 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 m6si3503391eda.215.2020.05.28.06.55.20; Thu, 28 May 2020 06:55:44 -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 S2390778AbgE1Nwv (ORCPT + 99 others); Thu, 28 May 2020 09:52:51 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:5382 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2390608AbgE1NvF (ORCPT ); Thu, 28 May 2020 09:51:05 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 5F3486E316487660269; Thu, 28 May 2020 21:50:59 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.487.0; Thu, 28 May 2020 21:50:49 +0800 From: Huazhong Tan To: CC: , , , , , , Huazhong Tan Subject: [PATCH net-next 03/12] net: hns3: refactor hclge_config_tso() Date: Thu, 28 May 2020 21:48:10 +0800 Message-ID: <1590673699-63819-4-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1590673699-63819-1-git-send-email-tanhuazhong@huawei.com> References: <1590673699-63819-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 7d5c304..35e5cb8 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