net/mlxbf_gige: use eth_zero_addr() to clear mac address
authorLu Wei <luwei32@huawei.com>
Mon, 16 May 2022 03:33:43 +0000 (11:33 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 17 May 2022 09:23:58 +0000 (11:23 +0200)
Use eth_zero_addr() to clear mac address instead of memset().

Signed-off-by: Lu Wei <luwei32@huawei.com>
Link: https://lore.kernel.org/r/20220516033343.329178-1-luwei32@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c

index 66ef0090755e8d92d8310b1882bd232427d969b6..84621b4cb15b05f3680f53a53a7b01bf7f400218 100644 (file)
@@ -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);