OSDN Git Service

net/mlx5: E-Switch, Remove redundant mc_promisc NULL check
authorParav Pandit <parav@mellanox.com>
Mon, 29 Jul 2019 21:13:10 +0000 (21:13 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 1 Aug 2019 18:14:25 +0000 (11:14 -0700)
commit131ce7014043087fbeddbcb3b8dac8891cd0e0fe
treeabe2d8ca94d879a70a38238d496b1c0eb8e180bb
parent9ddb830a14dbd88308354d27cd17009fc97d3a6f
net/mlx5: E-Switch, Remove redundant mc_promisc NULL check

mc_promisc pointer points to an instance of struct esw_mc_addr allocated
as part of the esw structure.
Hence it cannot be NULL.
Removed such redundant check and assign where it is actually used.

While at it, add comment around legacy mode fields and move mc_promisc
close to other legacy mode structures to improve code redability.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h