Skip to content

Commit bfb82c9

Browse files
vadimp-nvidiadavem330
authored andcommitted
mlxsw: core_thermal: Remove obsolete API for query resource
Remove obsolete API mlxsw_core_res_query_enabled(), which is only relevant for end-of-life SwitchX-2 ASICs. Support for these ASICs was removed in commit b0d80c0 ("mlxsw: Remove Mellanox SwitchX-2 ASIC support"). Signed-off-by: Vadim Pasternak <vadimp@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 009da9f commit bfb82c9

File tree

4 files changed

+0
-23
lines changed

4 files changed

+0
-23
lines changed

drivers/net/ethernet/mellanox/mlxsw/core.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,6 @@ void *mlxsw_core_driver_priv(struct mlxsw_core *mlxsw_core)
177177
}
178178
EXPORT_SYMBOL(mlxsw_core_driver_priv);
179179

180-
bool mlxsw_core_res_query_enabled(const struct mlxsw_core *mlxsw_core)
181-
{
182-
return mlxsw_core->driver->res_query_enabled;
183-
}
184-
EXPORT_SYMBOL(mlxsw_core_res_query_enabled);
185-
186180
bool mlxsw_core_temp_warn_enabled(const struct mlxsw_core *mlxsw_core)
187181
{
188182
return mlxsw_core->driver->temp_warn_enabled;

drivers/net/ethernet/mellanox/mlxsw/core.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ unsigned int mlxsw_core_max_ports(const struct mlxsw_core *mlxsw_core);
3535

3636
void *mlxsw_core_driver_priv(struct mlxsw_core *mlxsw_core);
3737

38-
bool mlxsw_core_res_query_enabled(const struct mlxsw_core *mlxsw_core);
39-
4038
bool mlxsw_core_temp_warn_enabled(const struct mlxsw_core *mlxsw_core);
4139

4240
bool

drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -655,9 +655,6 @@ static int mlxsw_hwmon_module_init(struct mlxsw_hwmon *mlxsw_hwmon)
655655
u8 module_sensor_max;
656656
int i, err;
657657

658-
if (!mlxsw_core_res_query_enabled(mlxsw_hwmon->core))
659-
return 0;
660-
661658
mlxsw_reg_mgpir_pack(mgpir_pl);
662659
err = mlxsw_reg_query(mlxsw_hwmon->core, MLXSW_REG(mgpir), mgpir_pl);
663660
if (err)

drivers/net/ethernet/mellanox/mlxsw/core_thermal.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -746,9 +746,6 @@ mlxsw_thermal_modules_init(struct device *dev, struct mlxsw_core *core,
746746
char mgpir_pl[MLXSW_REG_MGPIR_LEN];
747747
int i, err;
748748

749-
if (!mlxsw_core_res_query_enabled(core))
750-
return 0;
751-
752749
mlxsw_reg_mgpir_pack(mgpir_pl);
753750
err = mlxsw_reg_query(core, MLXSW_REG(mgpir), mgpir_pl);
754751
if (err)
@@ -793,9 +790,6 @@ mlxsw_thermal_modules_fini(struct mlxsw_thermal *thermal)
793790
{
794791
int i;
795792

796-
if (!mlxsw_core_res_query_enabled(thermal->core))
797-
return;
798-
799793
for (i = thermal->tz_module_num - 1; i >= 0; i--)
800794
mlxsw_thermal_module_fini(&thermal->tz_module_arr[i]);
801795
kfree(thermal->tz_module_arr);
@@ -843,9 +837,6 @@ mlxsw_thermal_gearboxes_init(struct device *dev, struct mlxsw_core *core,
843837
int i;
844838
int err;
845839

846-
if (!mlxsw_core_res_query_enabled(core))
847-
return 0;
848-
849840
mlxsw_reg_mgpir_pack(mgpir_pl);
850841
err = mlxsw_reg_query(core, MLXSW_REG(mgpir), mgpir_pl);
851842
if (err)
@@ -889,9 +880,6 @@ mlxsw_thermal_gearboxes_fini(struct mlxsw_thermal *thermal)
889880
{
890881
int i;
891882

892-
if (!mlxsw_core_res_query_enabled(thermal->core))
893-
return;
894-
895883
for (i = thermal->tz_gearbox_num - 1; i >= 0; i--)
896884
mlxsw_thermal_gearbox_tz_fini(&thermal->tz_gearbox_arr[i]);
897885
kfree(thermal->tz_gearbox_arr);

0 commit comments

Comments
 (0)