* [PATCH] drivers: vxlan: fix returnvar.cocci warning
@ 2022-03-08 10:00 Guo Zhengkui
2022-03-08 10:49 ` Paolo Abeni
0 siblings, 1 reply; 5+ messages in thread
From: Guo Zhengkui @ 2022-03-08 10:00 UTC (permalink / raw)
To: David S. Miller, Jakub Kicinski, Roopa Prabhu, Eric Dumazet,
Sebastian Andrzej Siewior, open list:NETWORKING DRIVERS,
open list
Cc: zhengkui_guo, Guo Zhengkui
Fix the following coccicheck warning:
drivers/net/vxlan/vxlan_core.c:2995:5-8:
Unneeded variable: "ret". Return "0" on line 3004.
Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
---
drivers/net/vxlan/vxlan_core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c
index b3cbd37c4b93..e06158a42823 100644
--- a/drivers/net/vxlan/vxlan_core.c
+++ b/drivers/net/vxlan/vxlan_core.c
@@ -2986,28 +2986,27 @@ static void vxlan_flush(struct vxlan_dev *vxlan, bool do_all)
}
spin_unlock_bh(&vxlan->hash_lock[h]);
}
}
/* Cleanup timer and forwarding table on shutdown */
static int vxlan_stop(struct net_device *dev)
{
struct vxlan_dev *vxlan = netdev_priv(dev);
- int ret = 0;
vxlan_multicast_leave(vxlan);
del_timer_sync(&vxlan->age_timer);
vxlan_flush(vxlan, false);
vxlan_sock_release(vxlan);
- return ret;
+ return 0;
}
/* Stub, nothing needs to be done. */
static void vxlan_set_multicast_list(struct net_device *dev)
{
}
static int vxlan_change_mtu(struct net_device *dev, int new_mtu)
{
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drivers: vxlan: fix returnvar.cocci warning
2022-03-08 10:00 [PATCH] drivers: vxlan: fix returnvar.cocci warning Guo Zhengkui
@ 2022-03-08 10:49 ` Paolo Abeni
2022-03-08 13:43 ` [PATCH linux-next v2] " Guo Zhengkui
0 siblings, 1 reply; 5+ messages in thread
From: Paolo Abeni @ 2022-03-08 10:49 UTC (permalink / raw)
To: Guo Zhengkui, David S. Miller, Jakub Kicinski, Roopa Prabhu,
Eric Dumazet, Sebastian Andrzej Siewior,
open list:NETWORKING DRIVERS, open list
Cc: zhengkui_guo
Hello,
On Tue, 2022-03-08 at 18:00 +0800, Guo Zhengkui wrote:
> Fix the following coccicheck warning:
>
> drivers/net/vxlan/vxlan_core.c:2995:5-8:
> Unneeded variable: "ret". Return "0" on line 3004.
>
> Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
Please specify a target tree (likely net-next) in the patch subj.
Additionally, this looks worthy a "Fixes" tag, likely:
Fixes: f9c4bb0b245c ("vxlan: vni filtering support on collect metadata device")
Thanks,
Paolo
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH linux-next v2] drivers: vxlan: fix returnvar.cocci warning
2022-03-08 10:49 ` Paolo Abeni
@ 2022-03-08 13:43 ` Guo Zhengkui
2022-03-08 20:32 ` Roopa Prabhu
2022-03-10 3:50 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 5+ messages in thread
From: Guo Zhengkui @ 2022-03-08 13:43 UTC (permalink / raw)
To: David S. Miller, Jakub Kicinski, Roopa Prabhu, Eric Dumazet,
Sebastian Andrzej Siewior, open list:NETWORKING DRIVERS,
open list
Cc: zhengkui_guo, Guo Zhengkui
Fix the following coccicheck warning:
drivers/net/vxlan/vxlan_core.c:2995:5-8:
Unneeded variable: "ret". Return "0" on line 3004.
Fixes: f9c4bb0b245c ("vxlan: vni filtering support on collect metadata device")
Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
---
drivers/net/vxlan/vxlan_core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c
index b3cbd37c4b93..e06158a42823 100644
--- a/drivers/net/vxlan/vxlan_core.c
+++ b/drivers/net/vxlan/vxlan_core.c
@@ -2992,7 +2992,6 @@ static void vxlan_flush(struct vxlan_dev *vxlan, bool do_all)
static int vxlan_stop(struct net_device *dev)
{
struct vxlan_dev *vxlan = netdev_priv(dev);
- int ret = 0;
vxlan_multicast_leave(vxlan);
@@ -3001,7 +3000,7 @@ static int vxlan_stop(struct net_device *dev)
vxlan_flush(vxlan, false);
vxlan_sock_release(vxlan);
- return ret;
+ return 0;
}
/* Stub, nothing needs to be done. */
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH linux-next v2] drivers: vxlan: fix returnvar.cocci warning
2022-03-08 13:43 ` [PATCH linux-next v2] " Guo Zhengkui
@ 2022-03-08 20:32 ` Roopa Prabhu
2022-03-10 3:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 5+ messages in thread
From: Roopa Prabhu @ 2022-03-08 20:32 UTC (permalink / raw)
To: Guo Zhengkui, David S. Miller, Jakub Kicinski, Eric Dumazet,
Sebastian Andrzej Siewior, open list:NETWORKING DRIVERS,
open list
Cc: zhengkui_guo
On 3/8/22 05:43, Guo Zhengkui wrote:
> Fix the following coccicheck warning:
>
> drivers/net/vxlan/vxlan_core.c:2995:5-8:
> Unneeded variable: "ret". Return "0" on line 3004.
>
> Fixes: f9c4bb0b245c ("vxlan: vni filtering support on collect metadata device")
> Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
> ---
Acked-by: Roopa Prabhu <roopa@nvidia.com>
the patch prefix should be net-next
thanks for the fix
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH linux-next v2] drivers: vxlan: fix returnvar.cocci warning
2022-03-08 13:43 ` [PATCH linux-next v2] " Guo Zhengkui
2022-03-08 20:32 ` Roopa Prabhu
@ 2022-03-10 3:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-03-10 3:50 UTC (permalink / raw)
To: Guo Zhengkui
Cc: davem, kuba, roopa, edumazet, bigeasy, netdev, linux-kernel,
zhengkui_guo
Hello:
This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 8 Mar 2022 21:43:09 +0800 you wrote:
> Fix the following coccicheck warning:
>
> drivers/net/vxlan/vxlan_core.c:2995:5-8:
> Unneeded variable: "ret". Return "0" on line 3004.
>
> Fixes: f9c4bb0b245c ("vxlan: vni filtering support on collect metadata device")
> Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
>
> [...]
Here is the summary with links:
- [linux-next,v2] drivers: vxlan: fix returnvar.cocci warning
https://git.kernel.org/netdev/net-next/c/e58bc864630f
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] 5+ messages in thread
end of thread, other threads:[~2022-03-10 3:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-08 10:00 [PATCH] drivers: vxlan: fix returnvar.cocci warning Guo Zhengkui
2022-03-08 10:49 ` Paolo Abeni
2022-03-08 13:43 ` [PATCH linux-next v2] " Guo Zhengkui
2022-03-08 20:32 ` Roopa Prabhu
2022-03-10 3:50 ` 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).