diff options
author | Eli Cohen <elic@nvidia.com> | 2021-02-08 11:07:53 +0200 |
---|---|---|
committer | Saeed Mahameed <saeedm@nvidia.com> | 2021-03-11 14:35:15 -0800 |
commit | 61e9508f1e5e5f7a32f51904cbde66f8fdcb452e (patch) | |
tree | b282611959a28dad4db7363cbdcf14724e993207 /drivers/net/ethernet/mellanox/mlx5 | |
parent | 03e219c4cf842d65c9e6f3d72f9c02d5cb3f578f (diff) |
net/mlx5: Avoid unnecessary operation
fs_get_obj retrieves the container of fs_parent_node just to pass the
same value as &fs_ns->node. Just pass fs_parent_node to
init_root_tree_recursive() to get exactly the same effect.
Signed-off-by: Eli Cohen <elic@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c index 66ad599bd488..f5517ea2f6be 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c @@ -2395,14 +2395,12 @@ static int init_root_tree(struct mlx5_flow_steering *steering, struct init_tree_node *init_node, struct fs_node *fs_parent_node) { - int i; - struct mlx5_flow_namespace *fs_ns; int err; + int i; - fs_get_obj(fs_ns, fs_parent_node); for (i = 0; i < init_node->ar_size; i++) { err = init_root_tree_recursive(steering, &init_node->children[i], - &fs_ns->node, + fs_parent_node, init_node, i); if (err) return err; |