All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sfc/ef10: remove unneeded rc variable
@ 2022-01-18  7:56 cgel.zte
  2022-01-19  8:26 ` Martin Habets
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-01-18  7:56 UTC (permalink / raw)
  To: ecree.xilinx
  Cc: habetsm.xilinx, davem, kuba, netdev, linux-kernel, Minghao Chi,
	Zeal Robot, CGEL ZTE

From: Minghao Chi <chi.minghao@zte.com.cn>

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

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
---
 drivers/net/ethernet/sfc/ef10.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
index cf366ed2557c..991758292b7c 100644
--- a/drivers/net/ethernet/sfc/ef10.c
+++ b/drivers/net/ethernet/sfc/ef10.c
@@ -3627,7 +3627,6 @@ static int efx_ef10_rx_disable_timestamping(struct efx_channel *channel,
 					    bool temp)
 {
 	MCDI_DECLARE_BUF(inbuf, MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_LEN);
-	int rc;
 
 	if (channel->sync_events_state == SYNC_EVENTS_DISABLED ||
 	    (temp && channel->sync_events_state == SYNC_EVENTS_QUIESCENT))
@@ -3646,10 +3645,8 @@ static int efx_ef10_rx_disable_timestamping(struct efx_channel *channel,
 	MCDI_SET_DWORD(inbuf, PTP_IN_TIME_EVENT_UNSUBSCRIBE_QUEUE,
 		       channel->channel);
 
-	rc = efx_mcdi_rpc(channel->efx, MC_CMD_PTP,
+	return efx_mcdi_rpc(channel->efx, MC_CMD_PTP,
 			  inbuf, sizeof(inbuf), NULL, 0, NULL);
-
-	return rc;
 }
 
 static int efx_ef10_ptp_set_ts_sync_events(struct efx_nic *efx, bool en,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-19  8:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-18  7:56 [PATCH] sfc/ef10: remove unneeded rc variable cgel.zte
2022-01-19  8:26 ` Martin Habets

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.