Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp212431ybh; Fri, 6 Mar 2020 19:53:04 -0800 (PST) X-Google-Smtp-Source: ADFU+vtphePDW9lb4jvz1FuVZbFhLnm+UmgGGwyVhChId8VUaRJja2OTu6U50NxNFx020DMdWxuk X-Received: by 2002:a05:6830:20d0:: with SMTP id z16mr5257529otq.25.1583553184168; Fri, 06 Mar 2020 19:53:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583553184; cv=none; d=google.com; s=arc-20160816; b=UT+tgL6YQwInS/t3xwNRcBnNT6H+tOZUkjJMRdRxtYFMCCrgcxMGaCQ8Jo2l7d54La 6dky6JQ/jTDGpnRX+A1WtK4D/gqw6vwffW8X+CBH1ivZHIpmOOk5OqV4RCQYyjQfF3YZ xbMiA/oc2VsMJ6Dmp1S0va7eFxJ6IC7DpmqSDYJiwRDtVI71OzvsTYLNGk1T2I84f6jN o+fPsaFSr5noY9GfEM4pgPyNgRV+sGLfoh1xClhooYwm+slFLFW65Fiaa++mG8vxQkNH O39/4aP9q6L1GfxMnDrtsNgNwd58LWCaSYSCzTHVp7o+MazmPTRmKP9NlJuBjbEZ0gk8 lmKg== 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=DSj4aDXsXEusJ/XKS4M2LRmpCtvjTeOpsVY6eZK9cQr7/U4l5nb9nSgSoYeKry1IGg VNYIZUy4oexEtlw+HW41z/0EQF8VDhvnrastJzWz71UEMGJuEjsbmFlAhxcPn2yBKVCR pmZvMvA0ug5HAhQER/bWyQJhqdnZX+JAlHDhyewwg9bJWm14tkV9dB7OaUyUWVMeUnmr aPiJFE9sSr1yTzI37KdUBtwZeRvK+bqFhu+EtubUZ1rbJ71XaXvoIOQYGCPK4ScVq22u YbRBPeccicsfZAfld1Qu8T42xe5wToRx/mipLL1T9NTi1WT9smYQh/RgVQI1njzWs2E7 3c9g== 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 z6si2719922oth.292.2020.03.06.19.52.52; Fri, 06 Mar 2020 19:53:04 -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 S1727000AbgCGDwc (ORCPT + 99 others); Fri, 6 Mar 2020 22:52:32 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:11604 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726382AbgCGDwc (ORCPT ); Fri, 6 Mar 2020 22:52:32 -0500 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 18B8E1C941367119C118; Sat, 7 Mar 2020 11:52:29 +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.439.0; Sat, 7 Mar 2020 11:52:19 +0800 From: Huazhong Tan To: CC: , , , , , , Guojia Liao , Huazhong Tan Subject: [PATCH V2 net-next 4/9] net: hns3: delete some reduandant code Date: Sat, 7 Mar 2020 11:42:45 +0800 Message-ID: <1583552570-51203-5-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1583552570-51203-1-git-send-email-tanhuazhong@huawei.com> References: <1583552570-51203-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