Skip to content

Commit 29e4c95

Browse files
Jiri PirkoSaeed Mahameed
authored andcommitted
net/mlx5: Remove pointless vport lookup from mlx5_esw_check_port_type()
As xa_get_mark() returns false in case the entry is not present, no need to redundantly check if vport is present. Remove the lookup. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Shay Drory <shayd@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
1 parent 899862b commit 29e4c95

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

  • drivers/net/ethernet/mellanox/mlx5/core

drivers/net/ethernet/mellanox/mlx5/core/eswitch.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1908,12 +1908,6 @@ int mlx5_eswitch_set_vport_mac(struct mlx5_eswitch *esw,
19081908

19091909
static bool mlx5_esw_check_port_type(struct mlx5_eswitch *esw, u16 vport_num, xa_mark_t mark)
19101910
{
1911-
struct mlx5_vport *vport;
1912-
1913-
vport = mlx5_eswitch_get_vport(esw, vport_num);
1914-
if (IS_ERR(vport))
1915-
return false;
1916-
19171911
return xa_get_mark(&esw->vports, vport_num, mark);
19181912
}
19191913

0 commit comments

Comments
 (0)