From: Kamal Heib Date: Mon, 17 Jun 2024 17:23:27 +0000 (-0400) Subject: net/mlx4_en: Use ethtool_puts to fill priv flags strings X-Git-Tag: io_uring-6.11-20240722~71^2~184^2~2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=e52e010395dc5232f7dd5c271367f4bdd18ab74c;p=linux-block.git 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 Reviewed-by: Simon Horman Link: https://lore.kernel.org/r/20240617172329.239819-2-kheib@redhat.com Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c index 619e1c3ef7f9..50a4a017a3f4 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c @@ -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; }