Commit ef17e2ac authored by Jason Wang's avatar Jason Wang Committed by David S. Miller

net: qed: remove unneeded return variables

Some return variables are never changed until function returned.
These variables are unneeded for their functions. Therefore, the
unneeded return variables can be removed safely by returning their
initial values.
Signed-off-by: default avatarJason Wang <wangborong@cdjrlc.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d4b996f9
...@@ -741,7 +741,6 @@ static int ...@@ -741,7 +741,6 @@ static int
qed_dcbx_read_local_lldp_mib(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) qed_dcbx_read_local_lldp_mib(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
{ {
struct qed_dcbx_mib_meta_data data; struct qed_dcbx_mib_meta_data data;
int rc = 0;
memset(&data, 0, sizeof(data)); memset(&data, 0, sizeof(data));
data.addr = p_hwfn->mcp_info->port_addr + offsetof(struct public_port, data.addr = p_hwfn->mcp_info->port_addr + offsetof(struct public_port,
...@@ -750,7 +749,7 @@ qed_dcbx_read_local_lldp_mib(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) ...@@ -750,7 +749,7 @@ qed_dcbx_read_local_lldp_mib(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
data.size = sizeof(struct lldp_config_params_s); data.size = sizeof(struct lldp_config_params_s);
qed_memcpy_from(p_hwfn, p_ptt, data.lldp_local, data.addr, data.size); qed_memcpy_from(p_hwfn, p_ptt, data.lldp_local, data.addr, data.size);
return rc; return 0;
} }
static int static int
...@@ -810,7 +809,6 @@ static int ...@@ -810,7 +809,6 @@ static int
qed_dcbx_read_local_mib(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) qed_dcbx_read_local_mib(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
{ {
struct qed_dcbx_mib_meta_data data; struct qed_dcbx_mib_meta_data data;
int rc = 0;
memset(&data, 0, sizeof(data)); memset(&data, 0, sizeof(data));
data.addr = p_hwfn->mcp_info->port_addr + data.addr = p_hwfn->mcp_info->port_addr +
...@@ -819,7 +817,7 @@ qed_dcbx_read_local_mib(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) ...@@ -819,7 +817,7 @@ qed_dcbx_read_local_mib(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
data.size = sizeof(struct dcbx_local_params); data.size = sizeof(struct dcbx_local_params);
qed_memcpy_from(p_hwfn, p_ptt, data.local_admin, data.addr, data.size); qed_memcpy_from(p_hwfn, p_ptt, data.local_admin, data.addr, data.size);
return rc; return 0;
} }
static int qed_dcbx_read_mib(struct qed_hwfn *p_hwfn, static int qed_dcbx_read_mib(struct qed_hwfn *p_hwfn,
......
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