[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240613184333.1126275-2-kheib@redhat.com>
Date: Thu, 13 Jun 2024 14:43:31 -0400
From: Kamal Heib <kheib@...hat.com>
To: netdev@...r.kernel.org
Cc: Tariq Toukan <tariqt@...dia.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Kamal Heib <kheib@...hat.com>
Subject: [PATCH net-next 1/3] 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@...hat.com>
---
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
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;
}
--
2.45.2
Powered by blists - more mailing lists