net/mlx4_en: Use ethtool_puts to fill priv flags strings

Use the ethtool_puts helper to print the priv flags strings into the
ethtool strings interface.

Signed-off-by: Kamal Heib <kheib@redhat.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/20240617172329.239819-2-kheib@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Kamal Heib 2024-06-17 13:23:27 -04:00 committed by Jakub Kicinski
parent 8c379e3ce4
commit e52e010395

View File

@ -536,8 +536,7 @@ static void mlx4_en_get_strings(struct net_device *dev,
break;
case ETH_SS_PRIV_FLAGS:
for (i = 0; i < ARRAY_SIZE(mlx4_en_priv_flags); i++)
strcpy(data + i * ETH_GSTRING_LEN,
mlx4_en_priv_flags[i]);
ethtool_puts(&data, mlx4_en_priv_flags[i]);
break;
}