Commit aa7a795e authored by Jian Shen's avatar Jian Shen Committed by David S. Miller

net: hns3: fix error type definition of return value

An enum type variable was used to store an "int" type return value.
This patch fixes it.

Fixes: 46a3df9f ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
Signed-off-by: default avatarJian Shen <shenjian15@huawei.com>
Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5d02a58d
......@@ -4107,8 +4107,8 @@ int hclge_add_uc_addr_common(struct hclge_vport *vport,
{
struct hclge_dev *hdev = vport->back;
struct hclge_mac_vlan_tbl_entry_cmd req;
enum hclge_cmd_status status;
u16 egress_port = 0;
int ret;
/* mac addr check */
if (is_zero_ether_addr(addr) ||
......@@ -4140,9 +4140,9 @@ int hclge_add_uc_addr_common(struct hclge_vport *vport,
hclge_prepare_mac_addr(&req, addr);
status = hclge_add_mac_vlan_tbl(vport, &req, NULL);
ret = hclge_add_mac_vlan_tbl(vport, &req, NULL);
return status;
return ret;
}
static int hclge_rm_uc_addr(struct hnae3_handle *handle,
......@@ -4158,7 +4158,7 @@ int hclge_rm_uc_addr_common(struct hclge_vport *vport,
{
struct hclge_dev *hdev = vport->back;
struct hclge_mac_vlan_tbl_entry_cmd req;
enum hclge_cmd_status status;
int ret;
/* mac addr check */
if (is_zero_ether_addr(addr) ||
......@@ -4174,9 +4174,9 @@ int hclge_rm_uc_addr_common(struct hclge_vport *vport,
hnae_set_bit(req.flags, HCLGE_MAC_VLAN_BIT0_EN_B, 1);
hnae_set_bit(req.entry_type, HCLGE_MAC_VLAN_BIT0_EN_B, 0);
hclge_prepare_mac_addr(&req, addr);
status = hclge_remove_mac_vlan_tbl(vport, &req);
ret = hclge_remove_mac_vlan_tbl(vport, &req);
return status;
return ret;
}
static int hclge_add_mc_addr(struct hnae3_handle *handle,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment