net: fec_ptp: remove redundant initialization of variable val
PATCH 1/1 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.
--- drivers/net/ethernet/freescale/fec_ptp.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/ethernet/freescale/fec_ptp.c +0 -1
@@ -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 ;
Signature · 1 line
2.33.1
Quoted 10 lines
-----Original Message-----
From: Colin Ian King <[email protected]>
Sent: 2022年1月24日 2:50
To: Joakim Zhang <[email protected]>; David S . Miller <[email protected]>; Jakub Kicinski <[email protected]>; [email protected]
Cc: [email protected]; [email protected]
Subject: [PATCH] net:fec_ptp: remove redundant initialization of variable val
Quoted 4 lines
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 <[email protected]>
Looks good for me, so
Best Regards,
Joakim Zhang
Quoted 20 lines
--- drivers/net/ethernet/freescale/fec_ptp.c | 1 - 1 file changed, 1 deletion(-)drivers/net/ethernet/freescale/fec_ptp.c +0
-1@@ -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
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · 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 <[email protected]>--- 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!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html