[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20211008053315.GD2048@kadam>
Date: Fri, 8 Oct 2021 08:33:15 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Colin King <colin.king@...onical.com>
Cc: Edward Cree <ecree.xilinx@...il.com>,
Martin Habets <habetsm.xilinx@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sfc: Remove redundant assignment of variable rc
On Thu, Oct 07, 2021 at 06:50:36PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@...onical.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@...onical.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, ×tamps);
>
> - rc = 0;
> -
You can remove the initializer at the start of the function as well.
regards,
dan carpenter
Powered by blists - more mailing lists