]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net/mlx5: Rename total_vfs to total_vports
authorParav Pandit <parav@mellanox.com>
Thu, 21 Mar 2019 22:51:29 +0000 (15:51 -0700)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 22 Mar 2019 19:09:29 +0000 (12:09 -0700)
Macro MLX5_TOTAL_VPORTS() returns total number of vports. Therefore,
rename variable total_vfs to total_vports to improve code readability.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Bodong Wang <bodong@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c

index f2260391be5b952478175de9be8235b3154c4ccf..ddee935df65d4e9f942f044588efb8fe735814a3 100644 (file)
@@ -1287,13 +1287,13 @@ void esw_offloads_cleanup_reps(struct mlx5_eswitch *esw)
 
 int esw_offloads_init_reps(struct mlx5_eswitch *esw)
 {
-       int total_vfs = MLX5_TOTAL_VPORTS(esw->dev);
+       int total_vports = MLX5_TOTAL_VPORTS(esw->dev);
        struct mlx5_core_dev *dev = esw->dev;
        struct mlx5_eswitch_rep *rep;
        u8 hw_id[ETH_ALEN], rep_type;
        int vport;
 
-       esw->offloads.vport_reps = kcalloc(total_vfs,
+       esw->offloads.vport_reps = kcalloc(total_vports,
                                           sizeof(struct mlx5_eswitch_rep),
                                           GFP_KERNEL);
        if (!esw->offloads.vport_reps)