Commit 416b2743 authored by Minghao Chi's avatar Minghao Chi Committed by David S. Miller
Browse files

ethernet/sfc: remove redundant rc variable



Return value from efx_mcdi_rpc() directly instead
of taking this in another redundant variable.

Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarMinghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: default avatarCGEL ZTE <cgel.zte@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a0619a9e
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -71,7 +71,6 @@ int efx_mcdi_set_link(struct efx_nic *efx, u32 capabilities,
		      u32 flags, u32 loopback_mode, u32 loopback_speed)
{
	MCDI_DECLARE_BUF(inbuf, MC_CMD_SET_LINK_IN_LEN);
	int rc;

	BUILD_BUG_ON(MC_CMD_SET_LINK_OUT_LEN != 0);

@@ -80,9 +79,8 @@ int efx_mcdi_set_link(struct efx_nic *efx, u32 capabilities,
	MCDI_SET_DWORD(inbuf, SET_LINK_IN_LOOPBACK_MODE, loopback_mode);
	MCDI_SET_DWORD(inbuf, SET_LINK_IN_LOOPBACK_SPEED, loopback_speed);

	rc = efx_mcdi_rpc(efx, MC_CMD_SET_LINK, inbuf, sizeof(inbuf),
	return efx_mcdi_rpc(efx, MC_CMD_SET_LINK, inbuf, sizeof(inbuf),
			  NULL, 0, NULL);
	return rc;
}

int efx_mcdi_loopback_modes(struct efx_nic *efx, u64 *loopback_modes)