Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1434292ybz; Sat, 25 Apr 2020 19:19:44 -0700 (PDT) X-Google-Smtp-Source: APiQypKP6Bq1WgagVtP+V+aGhS3NwB+8T6eXiHQ5x4gHgteIeRY2MUXuyX1v8FjPBH/XlIGysk0F X-Received: by 2002:a17:906:e5a:: with SMTP id q26mr13079932eji.261.1587867584356; Sat, 25 Apr 2020 19:19:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587867584; cv=none; d=google.com; s=arc-20160816; b=CwPpIi/QMLIx1hD7HzU/daRB63YXdTe1oNaAHawifVioCHiXL7sNgry5OibVLaWhbQ TgXa1+BpfLEEruer+FV6QfBrsd4TePqA84aFkWfqpQvIy6p8OUEHDyu8NdjvVAYx2qbx 5RUM79nJfB1gv42jhqCXdgOPfOWLI+8ek4DI8bB7gTYOl0M1KaoGQSs0croGE85zBN9V iAb1qEnnDzqxu+tL7e5S4bMd8wtmAC3EmdysuN1DlmSah7ePeSezS8koM2NAmri0hYNh LKfSlhGKZgRFVVjxxBu/rdv2IKiStCOirYTiJg4CknqDCHTtwU0fv7Xr5lUGuo+zKtIW +eNg== 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=YfsUai6/ZQ5wGBmAM//N+kUPYdjB0NizFtCwqxfPq249yTUSBNWf662xvoQhB4QaPb TRCqxZ6nlht4DJwBMrrdfGu5Id/FFvrXSoNc4yIaQ/UeOULEfLq0GdSBmz6uuLdLOs4g PPPNpLbxLj2okooHgD6FJkzgSh4lh7KOOOThjy3TD/jMJl54Y9lR9HgJkTt+vvt75l7Y soLeBDeiz4Z/Vy8v15yPW9jmrwpZ0JCcPbpGHtQs0lcavEZj87fwWSaW5SFZQXFgaN9F a3+38eyVaANxdtEHzoDG677eUSYS4s6nB9zke0WsJJxkgEltH/BxmEScZUWyp+mkZUsJ xrbg== 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 t13si5656519eds.358.2020.04.25.19.19.20; Sat, 25 Apr 2020 19:19: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 S1726425AbgDZCP6 (ORCPT + 99 others); Sat, 25 Apr 2020 22:15:58 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:2897 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726098AbgDZCPK (ORCPT ); Sat, 25 Apr 2020 22:15:10 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 1E4877C31D0918A63385; Sun, 26 Apr 2020 10:15:07 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Sun, 26 Apr 2020 10:15:00 +0800 From: Huazhong Tan To: CC: , , , , , , Jian Shen , Huazhong Tan Subject: [PATCH V2 net-next 2/9] net: hns3: remove unnecessary parameter 'is_alloc' in hclge_set_umv_space() Date: Sun, 26 Apr 2020 10:13:41 +0800 Message-ID: <1587867228-9955-3-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1587867228-9955-1-git-send-email-tanhuazhong@huawei.com> References: <1587867228-9955-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