[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220516033343.329178-1-luwei32@huawei.com>
Date: Mon, 16 May 2022 11:33:43 +0800
From: Lu Wei <luwei32@...wei.com>
To: <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
<pabeni@...hat.com>, <asmaa@...dia.com>, <davthompson@...dia.com>,
<limings@...dia.com>, <cai.huoqing@...ux.dev>, <arnd@...db.de>,
<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH net-next] net/mlxbf_gige: use eth_zero_addr() to clear mac address
Use eth_zero_addr() to clear mac address instead of memset().
Signed-off-by: Lu Wei <luwei32@...wei.com>
---
drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
index 66ef0090755e..84621b4cb15b 100644
--- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
@@ -69,7 +69,7 @@ static void mlxbf_gige_initial_mac(struct mlxbf_gige *priv)
u8 mac[ETH_ALEN];
u64 local_mac;
- memset(mac, 0, ETH_ALEN);
+ eth_zero_addr(mac);
mlxbf_gige_get_mac_rx_filter(priv, MLXBF_GIGE_LOCAL_MAC_FILTER_IDX,
&local_mac);
u64_to_ether_addr(local_mac, mac);
--
2.17.1
Powered by blists - more mailing lists