mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 08:44:41 +00:00 
			
		
		
		
	net: hns3: delete some reduandant code
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>
This commit is contained in:
		
							parent
							
								
									89a8555930
								
							
						
					
					
						commit
						01c45c521a
					
				
					 1 changed files with 0 additions and 2 deletions
				
			
		|  | @ -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) { | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Guojia Liao
						Guojia Liao