Skip to content

Commit 8ca52ad

Browse files
roidayanSaeed Mahameed
authored andcommitted
net/mlx5: E-Switch, Remove redundant dev arg from mlx5_esw_vport_alloc()
The passded esw->dev is redundant as esw being passed and esw->dev being used inside. Signed-off-by: Roi Dayan <[email protected]> Reviewed-by: Maor Dickman <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 45e261b commit 8ca52ad

File tree

1 file changed

+7
-7
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+7
-7
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,7 +1506,7 @@ int mlx5_esw_sf_max_hpf_functions(struct mlx5_core_dev *dev, u16 *max_sfs, u16 *
15061506
return err;
15071507
}
15081508

1509-
static int mlx5_esw_vport_alloc(struct mlx5_eswitch *esw, struct mlx5_core_dev *dev,
1509+
static int mlx5_esw_vport_alloc(struct mlx5_eswitch *esw,
15101510
int index, u16 vport_num)
15111511
{
15121512
struct mlx5_vport *vport;
@@ -1560,15 +1560,15 @@ static int mlx5_esw_vports_init(struct mlx5_eswitch *esw)
15601560

15611561
xa_init(&esw->vports);
15621562

1563-
err = mlx5_esw_vport_alloc(esw, dev, idx, MLX5_VPORT_PF);
1563+
err = mlx5_esw_vport_alloc(esw, idx, MLX5_VPORT_PF);
15641564
if (err)
15651565
goto err;
15661566
if (esw->first_host_vport == MLX5_VPORT_PF)
15671567
xa_set_mark(&esw->vports, idx, MLX5_ESW_VPT_HOST_FN);
15681568
idx++;
15691569

15701570
for (i = 0; i < mlx5_core_max_vfs(dev); i++) {
1571-
err = mlx5_esw_vport_alloc(esw, dev, idx, idx);
1571+
err = mlx5_esw_vport_alloc(esw, idx, idx);
15721572
if (err)
15731573
goto err;
15741574
xa_set_mark(&esw->vports, idx, MLX5_ESW_VPT_VF);
@@ -1577,7 +1577,7 @@ static int mlx5_esw_vports_init(struct mlx5_eswitch *esw)
15771577
}
15781578
base_sf_num = mlx5_sf_start_function_id(dev);
15791579
for (i = 0; i < mlx5_sf_max_functions(dev); i++) {
1580-
err = mlx5_esw_vport_alloc(esw, dev, idx, base_sf_num + i);
1580+
err = mlx5_esw_vport_alloc(esw, idx, base_sf_num + i);
15811581
if (err)
15821582
goto err;
15831583
xa_set_mark(&esw->vports, base_sf_num + i, MLX5_ESW_VPT_SF);
@@ -1588,20 +1588,20 @@ static int mlx5_esw_vports_init(struct mlx5_eswitch *esw)
15881588
if (err)
15891589
goto err;
15901590
for (i = 0; i < max_host_pf_sfs; i++) {
1591-
err = mlx5_esw_vport_alloc(esw, dev, idx, base_sf_num + i);
1591+
err = mlx5_esw_vport_alloc(esw, idx, base_sf_num + i);
15921592
if (err)
15931593
goto err;
15941594
xa_set_mark(&esw->vports, base_sf_num + i, MLX5_ESW_VPT_SF);
15951595
idx++;
15961596
}
15971597

15981598
if (mlx5_ecpf_vport_exists(dev)) {
1599-
err = mlx5_esw_vport_alloc(esw, dev, idx, MLX5_VPORT_ECPF);
1599+
err = mlx5_esw_vport_alloc(esw, idx, MLX5_VPORT_ECPF);
16001600
if (err)
16011601
goto err;
16021602
idx++;
16031603
}
1604-
err = mlx5_esw_vport_alloc(esw, dev, idx, MLX5_VPORT_UPLINK);
1604+
err = mlx5_esw_vport_alloc(esw, idx, MLX5_VPORT_UPLINK);
16051605
if (err)
16061606
goto err;
16071607
return 0;

0 commit comments

Comments
 (0)