mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-22 10:31:08 +00:00
Merge branch 'mlxsw-fix-wformat-truncation-warnings'
Petr Machata says:
====================
mlxsw: Fix -Wformat-truncation warnings
Ido Schimmel writes:
Commit 6d4ab2e97d
("extrawarn: enable format and stringop overflow
warnings in W=1") enabled format warnings as part of W=1 builds,
resulting in two new warnings in mlxsw. Fix both and target at net-next
as the warnings are not indicative of actual bugs.
====================
Link: https://lore.kernel.org/r/cover.1696600763.git.petrm@nvidia.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
commit
000677f9d6
2 changed files with 2 additions and 2 deletions
|
@ -536,7 +536,7 @@ mlxsw_thermal_modules_fini(struct mlxsw_thermal *thermal,
|
|||
static int
|
||||
mlxsw_thermal_gearbox_tz_init(struct mlxsw_thermal_module *gearbox_tz)
|
||||
{
|
||||
char tz_name[THERMAL_NAME_LENGTH];
|
||||
char tz_name[40];
|
||||
int ret;
|
||||
|
||||
if (gearbox_tz->slot_index)
|
||||
|
|
|
@ -619,7 +619,7 @@ static void mlxsw_sp_port_get_tc_strings(u8 **p, int tc)
|
|||
int i;
|
||||
|
||||
for (i = 0; i < MLXSW_SP_PORT_HW_TC_STATS_LEN; i++) {
|
||||
snprintf(*p, ETH_GSTRING_LEN, "%.29s_%.1d",
|
||||
snprintf(*p, ETH_GSTRING_LEN, "%.28s_%d",
|
||||
mlxsw_sp_port_hw_tc_stats[i].str, tc);
|
||||
*p += ETH_GSTRING_LEN;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue