|
|
d8f823 |
From 74070ba1fa2d9560c642c8f985236aa62b65c946 Mon Sep 17 00:00:00 2001
|
|
|
d8f823 |
From: Alaa Hleihel <ahleihel@redhat.com>
|
|
|
d8f823 |
Date: Sun, 10 May 2020 15:04:27 -0400
|
|
|
d8f823 |
Subject: [PATCH 106/312] [netdrv] net/mlx5: Remove redundant NULL
|
|
|
d8f823 |
initializations
|
|
|
d8f823 |
|
|
|
d8f823 |
Message-id: <20200510150452.10307-63-ahleihel@redhat.com>
|
|
|
d8f823 |
Patchwork-id: 306684
|
|
|
d8f823 |
Patchwork-instance: patchwork
|
|
|
d8f823 |
O-Subject: [RHEL8.3 BZ 1789380 v2 62/87] net/mlx5: Remove redundant NULL initializations
|
|
|
d8f823 |
Bugzilla: 1789380
|
|
|
d8f823 |
RH-Acked-by: Kamal Heib <kheib@redhat.com>
|
|
|
d8f823 |
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
|
|
|
d8f823 |
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
|
|
|
d8f823 |
RH-Acked-by: Jonathan Toppins <jtoppins@redhat.com>
|
|
|
d8f823 |
|
|
|
d8f823 |
Bugzilla: http://bugzilla.redhat.com/1789380
|
|
|
d8f823 |
Upstream: v5.5-rc1
|
|
|
d8f823 |
Conflicts:
|
|
|
d8f823 |
- drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
|
|
|
d8f823 |
Fix may be used uninitialized warning in function mlx5e_tc_tun_create_header_ipv6.
|
|
|
d8f823 |
This fix was taken from the following upstream merge commit:
|
|
|
d8f823 |
95e6ba513316 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net")
|
|
|
d8f823 |
|
|
|
d8f823 |
commit e6014afd1c5717d556778ec1307cf7ab27ba5a2d
|
|
|
d8f823 |
Author: Eli Cohen <eli@mellanox.com>
|
|
|
d8f823 |
Date: Wed Oct 30 16:48:15 2019 +0200
|
|
|
d8f823 |
|
|
|
d8f823 |
net/mlx5: Remove redundant NULL initializations
|
|
|
d8f823 |
|
|
|
d8f823 |
Neighbour initializations to NULL are not necessary as the pointers are
|
|
|
d8f823 |
not used if an error is returned, and if success returned, pointers are
|
|
|
d8f823 |
initialized.
|
|
|
d8f823 |
|
|
|
d8f823 |
Signed-off-by: Eli Cohen <eli@mellanox.com>
|
|
|
d8f823 |
Reviewed-by: Vlad Buslov <vladbu@mellanox.com>
|
|
|
d8f823 |
Reviewed-by: Roi Dayan <roid@mellanox.com>
|
|
|
d8f823 |
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
|
|
|
d8f823 |
|
|
|
d8f823 |
Signed-off-by: Alaa Hleihel <ahleihel@redhat.com>
|
|
|
d8f823 |
Signed-off-by: Frantisek Hrbata <fhrbata@redhat.com>
|
|
|
d8f823 |
---
|
|
|
d8f823 |
drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c | 8 ++++----
|
|
|
d8f823 |
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
d8f823 |
|
|
|
d8f823 |
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
|
|
|
d8f823 |
index c2a4b6710f74..92559a758d07 100644
|
|
|
d8f823 |
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
|
|
|
d8f823 |
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.c
|
|
|
d8f823 |
@@ -77,8 +77,8 @@ static int mlx5e_route_lookup_ipv4(struct mlx5e_priv *priv,
|
|
|
d8f823 |
struct neighbour **out_n,
|
|
|
d8f823 |
u8 *out_ttl)
|
|
|
d8f823 |
{
|
|
|
d8f823 |
+ struct neighbour *n;
|
|
|
d8f823 |
struct rtable *rt;
|
|
|
d8f823 |
- struct neighbour *n = NULL;
|
|
|
d8f823 |
|
|
|
d8f823 |
#if IS_ENABLED(CONFIG_INET)
|
|
|
d8f823 |
struct mlx5_core_dev *mdev = priv->mdev;
|
|
|
d8f823 |
@@ -138,8 +138,8 @@ static int mlx5e_route_lookup_ipv6(struct mlx5e_priv *priv,
|
|
|
d8f823 |
struct neighbour **out_n,
|
|
|
d8f823 |
u8 *out_ttl)
|
|
|
d8f823 |
{
|
|
|
d8f823 |
- struct neighbour *n = NULL;
|
|
|
d8f823 |
struct dst_entry *dst;
|
|
|
d8f823 |
+ struct neighbour *n;
|
|
|
d8f823 |
|
|
|
d8f823 |
#if IS_ENABLED(CONFIG_INET) && IS_ENABLED(CONFIG_IPV6)
|
|
|
d8f823 |
int ret;
|
|
|
d8f823 |
@@ -212,8 +212,8 @@ int mlx5e_tc_tun_create_header_ipv4(struct mlx5e_priv *priv,
|
|
|
d8f823 |
int max_encap_size = MLX5_CAP_ESW(priv->mdev, max_encap_header_size);
|
|
|
d8f823 |
const struct ip_tunnel_key *tun_key = &e->tun_info->key;
|
|
|
d8f823 |
struct net_device *out_dev, *route_dev;
|
|
|
d8f823 |
- struct neighbour *n = NULL;
|
|
|
d8f823 |
struct flowi4 fl4 = {};
|
|
|
d8f823 |
+ struct neighbour *n;
|
|
|
d8f823 |
int ipv4_encap_size;
|
|
|
d8f823 |
char *encap_header;
|
|
|
d8f823 |
u8 nud_state, ttl;
|
|
|
d8f823 |
@@ -331,9 +331,9 @@ int mlx5e_tc_tun_create_header_ipv6(struct mlx5e_priv *priv,
|
|
|
d8f823 |
int max_encap_size = MLX5_CAP_ESW(priv->mdev, max_encap_header_size);
|
|
|
d8f823 |
const struct ip_tunnel_key *tun_key = &e->tun_info->key;
|
|
|
d8f823 |
struct net_device *out_dev, *route_dev;
|
|
|
d8f823 |
- struct neighbour *n = NULL;
|
|
|
d8f823 |
struct flowi6 fl6 = {};
|
|
|
d8f823 |
struct ipv6hdr *ip6h;
|
|
|
d8f823 |
+ struct neighbour *n = NULL;
|
|
|
d8f823 |
int ipv6_encap_size;
|
|
|
d8f823 |
char *encap_header;
|
|
|
d8f823 |
u8 nud_state, ttl;
|
|
|
d8f823 |
--
|
|
|
d8f823 |
2.13.6
|
|
|
d8f823 |
|