Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp103480ybz; Thu, 23 Apr 2020 19:26:25 -0700 (PDT) X-Google-Smtp-Source: APiQypI9nDYhMxSs0T+B+M7OmJhdlBbCDZWdpDpibyEQJC+c4SrFuu7hKTbrrWrcbXOIXu9gNy4+ X-Received: by 2002:aa7:d504:: with SMTP id y4mr5230956edq.295.1587695185282; Thu, 23 Apr 2020 19:26:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587695185; cv=none; d=google.com; s=arc-20160816; b=DGLOV/Tg8Uu+BxmSPDF9h3DmUKBx33tcqXb/Qd5KrnzWtZdhl6DUejPsn9FLBdWex8 tZ30rdO26+S/zUXJXWYztGjzQUa18lVxkR7aOirSaI0mCDkiHSDCiRtmPyO2QdvZUzse P5/7V74NxoMyRUFvs8G3oR+MoK/5j+ShQ7ogY0jn9lPPjN0ZSocNFgEHGkBorA8K2/bW RXufXt1NM3eOUFDI0Hsv5OsbSajJxKubOSz2OQ6rbikGNrXNIdHhwh94i4iRcB8LVmjD gJuUX43khnsbMY7xnmNNcGE/J46Z4aSbgfN6IINds461tevexrvZp+lHJRHmqvwmtqeB H91A== 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=AYm67xW65tVgmwWyYcQ9rNbvJqgahKHmYveibMezJj4=; b=X58i/Mh6Rsm6h12Lqg8JFrFHGycBWDwZ64O80dwxHYNunCJU6vyczAdRfYQPJG3pdq VQPqHLdNcbauvDhle8wrjFQ6XkF3IFSCPRP5f9eQfsF5XvYhKPgW4R19vppiBQeO2P2/ V97j67keki1zvACpZq4JoEx6zYO1loNchAB6MAl6n7iE/ItWxV8VFt/R196XVaREwKkh oPBSTBiuw7avD5oNPzT4N1VVEv5eyzNe++3cdvgh/pMXSA1Fjuh07sh7ONb/CaL7pH/i WBm+nmoFzI83evX50O8b+4vATmxM6Q/fn5WpZZORCh37gccAoprC0nx54/jtwas03mn1 LyTA== 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 31si2332859edp.496.2020.04.23.19.25.58; Thu, 23 Apr 2020 19:26:25 -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 S1726458AbgDXCYc (ORCPT + 99 others); Thu, 23 Apr 2020 22:24:32 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:2889 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726241AbgDXCYa (ORCPT ); Thu, 23 Apr 2020 22:24:30 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id B844EB038BFB166250BF; Fri, 24 Apr 2020 10:24:24 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Fri, 24 Apr 2020 10:24:16 +0800 From: Huazhong Tan To: CC: , , , , , , Jian Shen , Huazhong Tan Subject: [PATCH net-next 2/8] net: hns3: remove unnecessary parameter 'is_alloc' in hclge_set_umv_space() Date: Fri, 24 Apr 2020 10:23:07 +0800 Message-ID: <1587694993-25183-3-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1587694993-25183-1-git-send-email-tanhuazhong@huawei.com> References: <1587694993-25183-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 From: Jian Shen Since hclge_set_umv_space() is only called by hclge_init_umv_space(), so parameter 'is_alloc' is redundant. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index ccf269a..fe6e60a 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -7195,7 +7195,7 @@ static int hclge_add_mac_vlan_tbl(struct hclge_vport *vport, } static int hclge_set_umv_space(struct hclge_dev *hdev, u16 space_size, - u16 *allocated_size, bool is_alloc) + u16 *allocated_size) { struct hclge_umv_spc_alc_cmd *req; struct hclge_desc desc; @@ -7203,20 +7203,17 @@ static int hclge_set_umv_space(struct hclge_dev *hdev, u16 space_size, req = (struct hclge_umv_spc_alc_cmd *)desc.data; hclge_cmd_setup_basic_desc(&desc, HCLGE_OPC_MAC_VLAN_ALLOCATE, false); - if (!is_alloc) - hnae3_set_bit(req->allocate, HCLGE_UMV_SPC_ALC_B, 1); req->space_size = cpu_to_le32(space_size); ret = hclge_cmd_send(&hdev->hw, &desc, 1); if (ret) { - dev_err(&hdev->pdev->dev, - "%s umv space failed for cmd_send, ret =%d\n", - is_alloc ? "allocate" : "free", ret); + dev_err(&hdev->pdev->dev, "failed to set umv space, ret = %d\n", + ret); return ret; } - if (is_alloc && allocated_size) + if (allocated_size) *allocated_size = le32_to_cpu(desc.data[1]); return 0; @@ -7227,8 +7224,7 @@ static int hclge_init_umv_space(struct hclge_dev *hdev) u16 allocated_size = 0; int ret; - ret = hclge_set_umv_space(hdev, hdev->wanted_umv_size, &allocated_size, - true); + ret = hclge_set_umv_space(hdev, hdev->wanted_umv_size, &allocated_size); if (ret) return ret; -- 2.7.4