net/mlx5: Remove redundant max_sfs check and field from struct mlx5_sf_dev_table
authorJiri Pirko <jiri@nvidia.com>
Wed, 28 Jun 2023 11:19:05 +0000 (13:19 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 20 Sep 2023 06:33:07 +0000 (23:33 -0700)
commit7c35cd836f21acbb1141e03bca737c7e6ddd768a
tree8a8d6fb45282d0c96e789441d518283b17400a11
parent2fe6545ef541bff33362bcce9214e9e390ca34b9
net/mlx5: Remove redundant max_sfs check and field from struct mlx5_sf_dev_table

table->max_sfs is initialized in mlx5_sf_dev_table_create() and only
used to check for 0 in mlx5_sf_dev_add(). mlx5_sf_dev_add() is called
either from mlx5_sf_dev_state_change_handler() or
mlx5_sf_dev_add_active_work(). Both ensure max SF count is not 0,
using mlx5_sf_max_functions() helper before calling mlx5_sf_dev_add().

So remove the redundant check and no longer used max_sfs field.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Shay Drory <shayd@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/sf/dev/dev.c