Message ID | 583a70c6dbe75e6bf0c2c58abbb3470a860d2dc3.1722345311.git.petrm@nvidia.com (mailing list archive) |
---|---|
State | Accepted |
Commit | b0d21321140ce9a3cbdf877a4902cce2b596f282 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | mlxsw: core_thermal: Small cleanups | expand |
On Tue, 30 Jul 2024 15:58:21 +0200 Petr Machata wrote: > From: Ido Schimmel <idosch@nvidia.com> > > The name of a thermal zone device cannot be longer than 19 characters > ('THERMAL_NAME_LENGTH - 1'). The format string 'mlxsw-lc%d-module%d' can > exceed this limitation if the maximum number of line cards cannot be > represented using a single digit and the maximum number of transceiver > modules cannot be represented using two digits. The ordering could have been better since this comes from patch 6 in the same series :(
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c index 269c4986ea24..303d2ce4dc1e 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c +++ b/drivers/net/ethernet/mellanox/mlxsw/core_thermal.c @@ -411,7 +411,7 @@ static const struct thermal_cooling_device_ops mlxsw_cooling_ops = { static int mlxsw_thermal_module_tz_init(struct mlxsw_thermal_module *module_tz) { - char tz_name[THERMAL_NAME_LENGTH]; + char tz_name[40]; int err; if (module_tz->slot_index)