linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [net-next] net/mlx5e: fix another maybe-uninitialized false-positive
@ 2017-02-03 16:37 Arnd Bergmann
  2017-02-05 10:42 ` Or Gerlitz
  2017-02-06 21:35 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2017-02-03 16:37 UTC (permalink / raw)
  To: Saeed Mahameed, Matan Barak, Leon Romanovsky
  Cc: Arnd Bergmann, David S. Miller, Or Gerlitz, Hadar Hen Zion,
	Roi Dayan, Amir Vadai, Maor Gottlieb, Mark Bloch, netdev,
	linux-rdma, linux-kernel

In commit abeffce ("net/mlx5e: Fix a -Wmaybe-uninitialized warning"), I fixed a
gcc warning for the ipv4 offload handling. Now we get the same warning for the
added ipv6 support:

drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:815:40: warning: 'out_dev' may be used uninitialized in this function [-Wmaybe-uninitialized]

We can apply the same workaround here as well.

Fixes: ce99f6b97fcd ("net/mlx5e: Support SRIOV TC encapsulation offloads for IPv6 tunnels")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index e3cf5f484153..d87a82682cb5 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -731,8 +731,8 @@ static int mlx5e_route_lookup_ipv6(struct mlx5e_priv *priv,
 	int ret;
 
 	dst = ip6_route_output(dev_net(mirred_dev), NULL, fl6);
-	if (dst->error) {
-		ret = dst->error;
+	ret = dst->error;
+	if (ret) {
 		dst_release(dst);
 		return ret;
 	}
-- 
2.9.0

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

* Re: [PATCH] [net-next] net/mlx5e: fix another maybe-uninitialized false-positive
  2017-02-03 16:37 [PATCH] [net-next] net/mlx5e: fix another maybe-uninitialized false-positive Arnd Bergmann
@ 2017-02-05 10:42 ` Or Gerlitz
  2017-02-06 21:35 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Or Gerlitz @ 2017-02-05 10:42 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Saeed Mahameed, David S. Miller, Or Gerlitz, Linux Kernel,
	Linux Netdev List

On Fri, Feb 3, 2017 at 6:37 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> In commit abeffce ("net/mlx5e: Fix a -Wmaybe-uninitialized warning"), I fixed a
> gcc warning for the ipv4 offload handling. Now we get the same warning for the
> added ipv6 support:
>
> drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:815:40: warning: 'out_dev' may be used uninitialized in this function [-Wmaybe-uninitialized]
>
> We can apply the same workaround here as well.
>
> Fixes: ce99f6b97fcd ("net/mlx5e: Support SRIOV TC encapsulation offloads for IPv6 tunnels")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

frustrating... I don't see the warning with gcc 5.3.1 [1], but still,
the patch is OKay

Acked-by: Or Gerlitz <ogerlitz@mellanox.com>

[1] I used #make KCFLAGS='-Wmaybe-uninitialized'
M=drivers/net/ethernet/mellanox/mlx5/core   -j something

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

* Re: [PATCH] [net-next] net/mlx5e: fix another maybe-uninitialized false-positive
  2017-02-03 16:37 [PATCH] [net-next] net/mlx5e: fix another maybe-uninitialized false-positive Arnd Bergmann
  2017-02-05 10:42 ` Or Gerlitz
@ 2017-02-06 21:35 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-02-06 21:35 UTC (permalink / raw)
  To: arnd
  Cc: saeedm, matanb, leonro, ogerlitz, hadarh, roid, amirva, maorg,
	markb, netdev, linux-rdma, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>
Date: Fri,  3 Feb 2017 17:37:03 +0100

> In commit abeffce ("net/mlx5e: Fix a -Wmaybe-uninitialized warning"), I fixed a
> gcc warning for the ipv4 offload handling. Now we get the same warning for the
> added ipv6 support:
> 
> drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:815:40: warning: 'out_dev' may be used uninitialized in this function [-Wmaybe-uninitialized]
> 
> We can apply the same workaround here as well.
> 
> Fixes: ce99f6b97fcd ("net/mlx5e: Support SRIOV TC encapsulation offloads for IPv6 tunnels")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Applied.

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

end of thread, other threads:[~2017-02-06 21:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-03 16:37 [PATCH] [net-next] net/mlx5e: fix another maybe-uninitialized false-positive Arnd Bergmann
2017-02-05 10:42 ` Or Gerlitz
2017-02-06 21:35 ` David Miller

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).