All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vxlan: hide unused local variable
@ 2016-11-07 21:09 Arnd Bergmann
       [not found] ` <CAOrHB_BRnCmka_cQ1ALnOC1Yta7c8_KWrQ7tzr2tX2fbvOjs7g@mail.gmail.com>
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Arnd Bergmann @ 2016-11-07 21:09 UTC (permalink / raw)
  To: David S. Miller
  Cc: Arnd Bergmann, Jiri Benc, Hannes Frederic Sowa, Alexander Duyck,
	pravin shelar, netdev, linux-kernel

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 <arnd@arndb.de>
---
 drivers/net/vxlan.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index cb5cc7c03160..5264c1a49d86 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -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);
-- 
2.9.0

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

* Re: [PATCH] vxlan: hide unused local variable
       [not found] ` <CAOrHB_BRnCmka_cQ1ALnOC1Yta7c8_KWrQ7tzr2tX2fbvOjs7g@mail.gmail.com>
@ 2016-11-07 22:21   ` Arnd Bergmann
  2016-11-08  0:25     ` Pravin Shelar
  0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2016-11-07 22:21 UTC (permalink / raw)
  To: Pravin Shelar
  Cc: David S. Miller, Jiri Benc, Hannes Frederic Sowa,
	Alexander Duyck, netdev, linux-kernel

On Monday, November 7, 2016 2:16:30 PM CET Pravin Shelar wrote:
> On Monday, November 7, 2016, Arnd Bergmann <arnd@arndb.de> wrote:
> 
> > 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 <arnd@arndb.de <javascript:;>>
> > ---
> 
> 
> I have already submitted patch to fix this issue.
> 
> https://patchwork.ozlabs.org/patch/691588/

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

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

* Re: [PATCH] vxlan: hide unused local variable
  2016-11-07 22:21   ` Arnd Bergmann
@ 2016-11-08  0:25     ` Pravin Shelar
  2016-11-08  1:18       ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Pravin Shelar @ 2016-11-08  0:25 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: David S. Miller, Jiri Benc, Hannes Frederic Sowa,
	Alexander Duyck, netdev

On Mon, Nov 7, 2016 at 2:21 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Monday, November 7, 2016 2:16:30 PM CET Pravin Shelar wrote:
>> On Monday, November 7, 2016, Arnd Bergmann <arnd@arndb.de> wrote:
>>
>> > 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 <arnd@arndb.de <javascript:;>>
>> > ---
>>
>>
>> I have already submitted patch to fix this issue.
>>
>> https://patchwork.ozlabs.org/patch/691588/
>
> 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.

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

* Re: [PATCH] vxlan: hide unused local variable
  2016-11-08  0:25     ` Pravin Shelar
@ 2016-11-08  1:18       ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2016-11-08  1:18 UTC (permalink / raw)
  To: pshelar; +Cc: arnd, jbenc, hannes, aduyck, netdev

From: Pravin Shelar <pshelar@ovn.org>
Date: Mon, 7 Nov 2016 16:25:54 -0800

> On Mon, Nov 7, 2016 at 2:21 PM, Arnd Bergmann <arnd@arndb.de> wrote:
>> On Monday, November 7, 2016 2:16:30 PM CET Pravin Shelar wrote:
>>> On Monday, November 7, 2016, Arnd Bergmann <arnd@arndb.de> wrote:
>>>
>>> > 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 <arnd@arndb.de <javascript:;>>
>>> > ---
>>>
>>>
>>> I have already submitted patch to fix this issue.
>>>
>>> https://patchwork.ozlabs.org/patch/691588/
>>
>> 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'.

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

* Re: [PATCH] vxlan: hide unused local variable
  2016-11-07 21:09 [PATCH] vxlan: hide unused local variable Arnd Bergmann
       [not found] ` <CAOrHB_BRnCmka_cQ1ALnOC1Yta7c8_KWrQ7tzr2tX2fbvOjs7g@mail.gmail.com>
@ 2016-11-09 16:19 ` Jiri Benc
  2016-11-10  0:00 ` David Miller
  2 siblings, 0 replies; 6+ messages in thread
From: Jiri Benc @ 2016-11-09 16:19 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: David S. Miller, Hannes Frederic Sowa, Alexander Duyck,
	pravin shelar, netdev, linux-kernel

On Mon,  7 Nov 2016 22:09:07 +0100, Arnd Bergmann wrote:
> 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 <arnd@arndb.de>

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.

Acked-by: Jiri Benc <jbenc@redhat.com>

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

* Re: [PATCH] vxlan: hide unused local variable
  2016-11-07 21:09 [PATCH] vxlan: hide unused local variable Arnd Bergmann
       [not found] ` <CAOrHB_BRnCmka_cQ1ALnOC1Yta7c8_KWrQ7tzr2tX2fbvOjs7g@mail.gmail.com>
  2016-11-09 16:19 ` Jiri Benc
@ 2016-11-10  0:00 ` David Miller
  2 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2016-11-10  0:00 UTC (permalink / raw)
  To: arnd; +Cc: jbenc, hannes, aduyck, pshelar, netdev, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>
Date: Mon,  7 Nov 2016 22:09:07 +0100

> 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 <arnd@arndb.de>

Applied.

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

end of thread, other threads:[~2016-11-10  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-07 21:09 [PATCH] vxlan: hide unused local variable Arnd Bergmann
     [not found] ` <CAOrHB_BRnCmka_cQ1ALnOC1Yta7c8_KWrQ7tzr2tX2fbvOjs7g@mail.gmail.com>
2016-11-07 22:21   ` Arnd Bergmann
2016-11-08  0:25     ` Pravin Shelar
2016-11-08  1:18       ` David Miller
2016-11-09 16:19 ` Jiri Benc
2016-11-10  0:00 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.