Skip to content

Commit

Permalink
mlxsw: core_thermal: Remove obsolete API for query resource
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
vadimp-nvidia authored and davem330 committed Feb 23, 2022
1 parent 009da9f commit bfb82c9
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 23 deletions.
6 changes: 0 additions & 6 deletions drivers/net/ethernet/mellanox/mlxsw/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,6 @@ void *mlxsw_core_driver_priv(struct mlxsw_core *mlxsw_core)
}
EXPORT_SYMBOL(mlxsw_core_driver_priv);

bool mlxsw_core_res_query_enabled(const struct mlxsw_core *mlxsw_core)
{
return mlxsw_core->driver->res_query_enabled;
}
EXPORT_SYMBOL(mlxsw_core_res_query_enabled);

bool mlxsw_core_temp_warn_enabled(const struct mlxsw_core *mlxsw_core)
{
return mlxsw_core->driver->temp_warn_enabled;
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/ethernet/mellanox/mlxsw/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ unsigned int mlxsw_core_max_ports(const struct mlxsw_core *mlxsw_core);

void *mlxsw_core_driver_priv(struct mlxsw_core *mlxsw_core);

bool mlxsw_core_res_query_enabled(const struct mlxsw_core *mlxsw_core);

bool mlxsw_core_temp_warn_enabled(const struct mlxsw_core *mlxsw_core);

bool
Expand Down
3 changes: 0 additions & 3 deletions drivers/net/ethernet/mellanox/mlxsw/core_hwmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,9 +655,6 @@ static int mlxsw_hwmon_module_init(struct mlxsw_hwmon *mlxsw_hwmon)
u8 module_sensor_max;
int i, err;

if (!mlxsw_core_res_query_enabled(mlxsw_hwmon->core))
return 0;

mlxsw_reg_mgpir_pack(mgpir_pl);
err = mlxsw_reg_query(mlxsw_hwmon->core, MLXSW_REG(mgpir), mgpir_pl);
if (err)
Expand Down
12 changes: 0 additions & 12 deletions drivers/net/ethernet/mellanox/mlxsw/core_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,9 +746,6 @@ mlxsw_thermal_modules_init(struct device *dev, struct mlxsw_core *core,
char mgpir_pl[MLXSW_REG_MGPIR_LEN];
int i, err;

if (!mlxsw_core_res_query_enabled(core))
return 0;

mlxsw_reg_mgpir_pack(mgpir_pl);
err = mlxsw_reg_query(core, MLXSW_REG(mgpir), mgpir_pl);
if (err)
Expand Down Expand Up @@ -793,9 +790,6 @@ mlxsw_thermal_modules_fini(struct mlxsw_thermal *thermal)
{
int i;

if (!mlxsw_core_res_query_enabled(thermal->core))
return;

for (i = thermal->tz_module_num - 1; i >= 0; i--)
mlxsw_thermal_module_fini(&thermal->tz_module_arr[i]);
kfree(thermal->tz_module_arr);
Expand Down Expand Up @@ -843,9 +837,6 @@ mlxsw_thermal_gearboxes_init(struct device *dev, struct mlxsw_core *core,
int i;
int err;

if (!mlxsw_core_res_query_enabled(core))
return 0;

mlxsw_reg_mgpir_pack(mgpir_pl);
err = mlxsw_reg_query(core, MLXSW_REG(mgpir), mgpir_pl);
if (err)
Expand Down Expand Up @@ -889,9 +880,6 @@ mlxsw_thermal_gearboxes_fini(struct mlxsw_thermal *thermal)
{
int i;

if (!mlxsw_core_res_query_enabled(thermal->core))
return;

for (i = thermal->tz_gearbox_num - 1; i >= 0; i--)
mlxsw_thermal_gearbox_tz_fini(&thermal->tz_gearbox_arr[i]);
kfree(thermal->tz_gearbox_arr);
Expand Down

0 comments on commit bfb82c9

Please sign in to comment.