Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp6355925ybf; Thu, 5 Mar 2020 18:59:12 -0800 (PST) X-Google-Smtp-Source: ADFU+vuBZSlOpFxDCcUNkB0pVUnj+OOTQMS4YP8pEp+vMw9m5o/3TDQTFjj68uhj/ynfwvBguGXv X-Received: by 2002:a05:6830:1e14:: with SMTP id s20mr826422otr.322.1583463551876; Thu, 05 Mar 2020 18:59:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583463551; cv=none; d=google.com; s=arc-20160816; b=NtNWrYe7PpULpP2bYlqZZTZ8xNM7+8DprDgkvRR5PyNPsk2GIkzolUGtDusQ48j2Lc Rn5uzbXku3nObHzpJTZ8LDltUhbbukv7rq4CEl0K+nDL6RqdM8OOAlk3SXhCXVmqaJsD NnbvAOJ00ficYE8YAqc2RdFcgXn/NIh53aRPhyXTBvWS8rjB/Z+9npqU/T1jheXK7zFd YnIQIgEhvEdJITHILWqwUyi2zzT8k5+y+iWOeV45GFD7qb7/gWoTRfj/Xfg0sMkcCM3R Ib0AsGHyR/6gAoC01zroUfdov/Eyyml459nsIY9pFrVunt3X7ODrvOG3G/x9aBynt7TT M+vQ== 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=VpRVakAgHlYoirm5JykJd8JLdr5Ns9iXTGMuh+68xIE=; b=R3hxfdhTAGBt8wohMauapgteNNLHcdkEtUJZUcc+IasnSN1qsOtvWCr1BioTrgAW/n 5NqYV95cWoK0zy9j5BX0TbzS1xL0cHprRayodsnLY800RgN1vEU3+wZSkR5t25zBu2yF 65mbwpwmH63ORsyOFuoPchclthDak3AN3mC8ytJTnoh+rEZmS7YEkXNjlpKSWSHHp11r zMZ4fADMhM66JRKTs1UgVzZtWKTMRHu5oAShaUfv5XiWy0Ox9ZdZZj5Z9rkaPiMl4bT6 5KTj+BeyPCChCEOIdVcaUOSTfD13R4iIzHpE2FqlU7Axh/8wGO+QPs/RkbmBv7s1LnJV I3Kg== 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 w20si529706otj.294.2020.03.05.18.58.45; Thu, 05 Mar 2020 18:59:11 -0800 (PST) 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 S1727070AbgCFC6C (ORCPT + 99 others); Thu, 5 Mar 2020 21:58:02 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:38316 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727026AbgCFC6C (ORCPT ); Thu, 5 Mar 2020 21:58:02 -0500 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 61F9FBF77BF035097F84; Fri, 6 Mar 2020 10:57:58 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.439.0; Fri, 6 Mar 2020 10:57:49 +0800 From: Huazhong Tan To: CC: , , , , , , Guojia Liao , Huazhong Tan Subject: [PATCH net-next 4/9] net: hns3: delete some reduandant code Date: Fri, 6 Mar 2020 10:57:13 +0800 Message-ID: <1583463438-60953-5-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1583463438-60953-1-git-send-email-tanhuazhong@huawei.com> References: <1583463438-60953-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: Guojia Liao In hclge_add_mc_addr_common() and hclge_rm_mc_addr_common(), variable req had been set as "0" by memset(), so it's unnecessary to set .entry_type field as "0" with hnae3_set_bit() again. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index e64027c..6da55fb3 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -7354,7 +7354,6 @@ int hclge_add_mc_addr_common(struct hclge_vport *vport, return -EINVAL; } memset(&req, 0, sizeof(req)); - hnae3_set_bit(req.entry_type, HCLGE_MAC_VLAN_BIT0_EN_B, 0); hclge_prepare_mac_addr(&req, addr, true); status = hclge_lookup_mac_vlan_tbl(vport, &req, desc, true); if (status) { @@ -7399,7 +7398,6 @@ int hclge_rm_mc_addr_common(struct hclge_vport *vport, } memset(&req, 0, sizeof(req)); - hnae3_set_bit(req.entry_type, HCLGE_MAC_VLAN_BIT0_EN_B, 0); hclge_prepare_mac_addr(&req, addr, true); status = hclge_lookup_mac_vlan_tbl(vport, &req, desc, true); if (!status) { -- 2.7.4