]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
net: hns3: delete some reduandant code
authorGuojia Liao <liaoguojia@huawei.com>
Sat, 7 Mar 2020 03:42:45 +0000 (11:42 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 Mar 2020 02:36:13 +0000 (19:36 -0700)
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 <liaoguojia@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c

index e64027ca02038728021f4aeb74f937c0926183be..6da55fb3d0317d7dc4dc317d389668bb01f47421 100644 (file)
@@ -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) {