]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit610837c79bbde04f74e8c4b04bd0a530e30de59f
treeabe2d8ca94d879a70a38238d496b1c0eb8e180bb
parent10d093f9d9bb6ea363f583a9ceb9587a412f7d8f
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