public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 net-next] ipv6: sit: remove redundant ret = 0 assignment
@ 2026-04-08  3:20 Yue Haibing
  2026-04-10  3:40 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Yue Haibing @ 2026-04-08  3:20 UTC (permalink / raw)
  To: davem, dsahern, edumazet, kuba, pabeni, horms, yuehaibing
  Cc: netdev, linux-kernel

The variable ret is assigned a value at all places where it is used;
There is no need to assign a value when it is initially defined.

Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
---
v2: Remove redundant init during definition instead of init before copy_to_user
---
 net/ipv6/sit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index ef2e5111fb3a..201347b4e127 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -309,7 +309,7 @@ static int ipip6_tunnel_get_prl(struct net_device *dev, struct ip_tunnel_prl __u
 	struct ip_tunnel_prl kprl, *kp;
 	struct ip_tunnel_prl_entry *prl;
 	unsigned int cmax, c = 0, ca, len;
-	int ret = 0;
+	int ret;
 
 	if (dev == dev_to_sit_net(dev)->fb_tunnel_dev)
 		return -EINVAL;
-- 
2.34.1


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

* Re: [PATCH v2 net-next] ipv6: sit: remove redundant ret = 0 assignment
  2026-04-08  3:20 [PATCH v2 net-next] ipv6: sit: remove redundant ret = 0 assignment Yue Haibing
@ 2026-04-10  3:40 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-04-10  3:40 UTC (permalink / raw)
  To: Yue Haibing
  Cc: davem, dsahern, edumazet, kuba, pabeni, horms, netdev,
	linux-kernel

Hello:

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

On Wed, 8 Apr 2026 11:20:51 +0800 you wrote:
> The variable ret is assigned a value at all places where it is used;
> There is no need to assign a value when it is initially defined.
> 
> Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
> ---
> v2: Remove redundant init during definition instead of init before copy_to_user
> 
> [...]

Here is the summary with links:
  - [v2,net-next] ipv6: sit: remove redundant ret = 0 assignment
    https://git.kernel.org/netdev/net-next/c/3c6132ccc58e

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] 2+ messages in thread

end of thread, other threads:[~2026-04-10  3:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-08  3:20 [PATCH v2 net-next] ipv6: sit: remove redundant ret = 0 assignment Yue Haibing
2026-04-10  3:40 ` 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