All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sfc: Remove redundant assignment of variable rc
@ 2021-10-07 17:50 Colin King
  2021-10-08  5:33 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-10-07 17:50 UTC (permalink / raw)
  To: Edward Cree, Martin Habets, David S . Miller, Jakub Kicinski, netdev
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The variable rc is being assigned a value that is never read, it is
never accessed after the assignment. The assignment is redundant and
can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/ethernet/sfc/ptp.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/sfc/ptp.c b/drivers/net/ethernet/sfc/ptp.c
index a39c5143b386..f5198d6a3d43 100644
--- a/drivers/net/ethernet/sfc/ptp.c
+++ b/drivers/net/ethernet/sfc/ptp.c
@@ -1141,8 +1141,6 @@ static void efx_ptp_xmit_skb_mc(struct efx_nic *efx, struct sk_buff *skb)
 
 	skb_tstamp_tx(skb, &timestamps);
 
-	rc = 0;
-
 fail:
 	dev_kfree_skb_any(skb);
 
-- 
2.32.0


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

* Re: [PATCH] sfc: Remove redundant assignment of variable rc
  2021-10-07 17:50 [PATCH] sfc: Remove redundant assignment of variable rc Colin King
@ 2021-10-08  5:33 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2021-10-08  5:33 UTC (permalink / raw)
  To: Colin King
  Cc: Edward Cree, Martin Habets, David S . Miller, Jakub Kicinski,
	netdev, kernel-janitors, linux-kernel

On Thu, Oct 07, 2021 at 06:50:36PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable rc is being assigned a value that is never read, it is
> never accessed after the assignment. The assignment is redundant and
> can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/net/ethernet/sfc/ptp.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/sfc/ptp.c b/drivers/net/ethernet/sfc/ptp.c
> index a39c5143b386..f5198d6a3d43 100644
> --- a/drivers/net/ethernet/sfc/ptp.c
> +++ b/drivers/net/ethernet/sfc/ptp.c
> @@ -1141,8 +1141,6 @@ static void efx_ptp_xmit_skb_mc(struct efx_nic *efx, struct sk_buff *skb)
>  
>  	skb_tstamp_tx(skb, &timestamps);
>  
> -	rc = 0;
> -

You can remove the initializer at the start of the function as well.

regards,
dan carpenter


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

end of thread, other threads:[~2021-10-08  5:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-07 17:50 [PATCH] sfc: Remove redundant assignment of variable rc Colin King
2021-10-08  5:33 ` Dan Carpenter

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.