vxlan: hide unused local variable
Subsystems (2)
PATCH 1/1 vxlan: hide unused local variable
A bugfix introduced a harmless warning in v4.9-rc4:
drivers/net/vxlan.c: In function 'vxlan_group_used':drivers/net/vxlan.c:947:21: error: unused variable 'sock6' [-Werror=unused-variable]
This hides the variable inside of the same #ifdef that is around its user. The extraneous initialization is removed at the same time, it was accidentally introduced in the same commit.
--- drivers/net/vxlan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/vxlan.c +3 -1
@@ -944,7 +944,9 @@ static bool vxlan_group_used(struct vxlan_net *vn, struct vxlan_dev *dev) {struct vxlan_dev *vxlan;struct vxlan_sock *sock4; -struct vxlan_sock *sock6 =NULL ; +#if IS_ENABLED (CONFIG_IPV6 ) +struct vxlan_sock *sock6; +#endif unsigned short family = dev->default_dst.remote_ip.sa.sa_family; sock4 =rtnl_dereference (dev->vn4_sock);
Signature · 1 line
2.9.0
Quoted 13 lines · CET Pravin Shelar
Quoted 11 lines · Arnd Bergmann
A bugfix introduced a harmless warning in v4.9-rc4:
drivers/net/vxlan.c: In function 'vxlan_group_used':drivers/net/vxlan.c:947:21: error: unused variable 'sock6' [-Werror=unused-variable]This hides the variable inside of the same #ifdef that is around its user. The extraneous initialization is removed at the same time, it was accidentally introduced in the same commit.
Quoted 8 lines
Quoted 3 lines
Fixes c6fcc4fc5f8b ("vxlan: avoid using stale vxlan socket.")Signed-off-by Arnd Bergmann <[email protected] <javascript:;>>---
I have already submitted patch to fix this issue.
You have tagged those seven patches for net-next which seems appropriate, but as I wrote above the commit that introduced it was merged between -rc3 and -rc4, so I think we still need a fix for v4.9, right?
Arnd
Quoted 19 lines · Arnd Bergmann
Quoted 18 lines · CET Pravin Shelar
Quoted 14 lines · Arnd Bergmann
A bugfix introduced a harmless warning in v4.9-rc4:
drivers/net/vxlan.c: In function 'vxlan_group_used':drivers/net/vxlan.c:947:21: error: unused variable 'sock6' [-Werror=unused-variable]This hides the variable inside of the same #ifdef that is around its user. The extraneous initialization is removed at the same time, it was accidentally introduced in the same commit.
Fixes c6fcc4fc5f8b ("vxlan: avoid using stale vxlan socket.")Signed-off-by Arnd Bergmann <[email protected] <javascript:;>>---
Quoted 9 lines
Quoted 3 lines
I have already submitted patch to fix this issue.
You have tagged those seven patches for net-next which seems appropriate, but as I wrote above the commit that introduced it was merged between -rc3 and -rc4, so I think we still need a fix for v4.9, right?
This is not actual bug, So I am not sure if we need the fix for net branch.
David Miller
maintainerFrom: Pravin Shelar <[email protected]>
Date: Mon, 7 Nov 2016 16:25:54 -0800
Quoted 24 lines · Arnd Bergmann
Quoted 23 lines · CET Pravin Shelar
Quoted 21 lines · Arnd Bergmann
Quoted 7 lines
A bugfix introduced a harmless warning in v4.9-rc4:
drivers/net/vxlan.c: In function 'vxlan_group_used':drivers/net/vxlan.c:947:21: error: unused variable 'sock6' [-Werror=unused-variable]Quoted 8 lines
This hides the variable inside of the same #ifdef that is around its user. The extraneous initialization is removed at the same time, it was accidentally introduced in the same commit.
Fixes c6fcc4fc5f8b ("vxlan: avoid using stale vxlan socket.")Signed-off-by Arnd Bergmann <[email protected] <javascript:;>>---
I have already submitted patch to fix this issue.
Quoted 7 lines
Quoted 5 lines
You have tagged those seven patches for net-next which seems appropriate, but as I wrote above the commit that introduced it was merged between -rc3 and -rc4, so I think we still need a fix for v4.9, right?
This is not actual bug, So I am not sure if we need the fix for net branch.
Really ugly warnings like this really need to be fixed in 'net'.
Quoted 5 lines · Arnd Bergmann
A bugfix introduced a harmless warning in v4.9-rc4:
drivers/net/vxlan.c: In function 'vxlan_group_used':drivers/net/vxlan.c:947:21: error: unused variable 'sock6' [-Werror=unused-variable]
Quoted 7 lines
This hides the variable inside of the same #ifdef that is around its user. The extraneous initialization is removed at the same time, it was accidentally introduced in the same commit.
Fixes c6fcc4fc5f8b ("vxlan: avoid using stale vxlan socket.")Signed-off-by Arnd Bergmann <[email protected]>
I think this should be applied instead of Pravin's patch. It fixes just the one problem, contains the proper Fixes: tag and addresses net.git.
From: Arnd Bergmann <[email protected]>
Date: Mon, 7 Nov 2016 22:09:07 +0100
Quoted 5 lines
A bugfix introduced a harmless warning in v4.9-rc4:
drivers/net/vxlan.c: In function 'vxlan_group_used':drivers/net/vxlan.c:947:21: error: unused variable 'sock6' [-Werror=unused-variable]
Quoted 7 lines
This hides the variable inside of the same #ifdef that is around its user. The extraneous initialization is removed at the same time, it was accidentally introduced in the same commit.
Fixes c6fcc4fc5f8b ("vxlan: avoid using stale vxlan socket.")Signed-off-by Arnd Bergmann <[email protected]>
Applied.