netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: fec_ptp: remove redundant initialization of variable val
@ 2022-01-23 18:49 Colin Ian King
  2022-01-24  6:34 ` Joakim Zhang
  2022-01-25  1:26 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Colin Ian King @ 2022-01-23 18:49 UTC (permalink / raw)
  To: Joakim Zhang, David S . Miller, Jakub Kicinski, netdev
  Cc: kernel-janitors, linux-kernel

Variable val is being initialized with a value that is never read,
it is being re-assigned later. The assignment is redundant and
can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/net/ethernet/freescale/fec_ptp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c
index af99017a5453..7d49c28215f3 100644
--- a/drivers/net/ethernet/freescale/fec_ptp.c
+++ b/drivers/net/ethernet/freescale/fec_ptp.c
@@ -101,7 +101,6 @@ static int fec_ptp_enable_pps(struct fec_enet_private *fep, uint enable)
 	u32 val, tempval;
 	struct timespec64 ts;
 	u64 ns;
-	val = 0;
 
 	if (fep->pps_enable == enable)
 		return 0;
-- 
2.33.1


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

* RE: [PATCH] net: fec_ptp: remove redundant initialization of variable val
  2022-01-23 18:49 [PATCH] net: fec_ptp: remove redundant initialization of variable val Colin Ian King
@ 2022-01-24  6:34 ` Joakim Zhang
  2022-01-25  1:26 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Joakim Zhang @ 2022-01-24  6:34 UTC (permalink / raw)
  To: Colin Ian King, David S . Miller, Jakub Kicinski, netdev
  Cc: kernel-janitors, linux-kernel


> -----Original Message-----
> From: Colin Ian King <colin.i.king@gmail.com>
> Sent: 2022年1月24日 2:50
> To: Joakim Zhang <qiangqing.zhang@nxp.com>; David S . Miller
> <davem@davemloft.net>; Jakub Kicinski <kuba@kernel.org>;
> netdev@vger.kernel.org
> Cc: kernel-janitors@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH] net: fec_ptp: remove redundant initialization of variable val
> 
> Variable val is being initialized with a value that is never read, it is being
> re-assigned later. The assignment is redundant and can be removed.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>

Looks good for me, so

Reviewed-by: Joakim Zhang <qiangqing.zhang@nxp.com>

Best Regards,
Joakim Zhang
> ---
>  drivers/net/ethernet/freescale/fec_ptp.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_ptp.c
> b/drivers/net/ethernet/freescale/fec_ptp.c
> index af99017a5453..7d49c28215f3 100644
> --- a/drivers/net/ethernet/freescale/fec_ptp.c
> +++ b/drivers/net/ethernet/freescale/fec_ptp.c
> @@ -101,7 +101,6 @@ static int fec_ptp_enable_pps(struct
> fec_enet_private *fep, uint enable)
>  	u32 val, tempval;
>  	struct timespec64 ts;
>  	u64 ns;
> -	val = 0;
> 
>  	if (fep->pps_enable == enable)
>  		return 0;
> --
> 2.33.1


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

* Re: [PATCH] net: fec_ptp: remove redundant initialization of variable val
  2022-01-23 18:49 [PATCH] net: fec_ptp: remove redundant initialization of variable val Colin Ian King
  2022-01-24  6:34 ` Joakim Zhang
@ 2022-01-25  1:26 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-01-25  1:26 UTC (permalink / raw)
  To: Colin Ian King
  Cc: qiangqing.zhang, davem, kuba, netdev, kernel-janitors, linux-kernel

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Sun, 23 Jan 2022 18:49:36 +0000 you wrote:
> Variable val is being initialized with a value that is never read,
> it is being re-assigned later. The assignment is redundant and
> can be removed.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>  drivers/net/ethernet/freescale/fec_ptp.c | 1 -
>  1 file changed, 1 deletion(-)

Here is the summary with links:
  - net: fec_ptp: remove redundant initialization of variable val
    https://git.kernel.org/netdev/net-next/c/6e667749271e

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2022-01-25  3:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-23 18:49 [PATCH] net: fec_ptp: remove redundant initialization of variable val Colin Ian King
2022-01-24  6:34 ` Joakim Zhang
2022-01-25  1:26 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).