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@huawei.com> Link: https://lore.kernel.org/r/20220516033343.329178-1-luwei32@huawei.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
1588f5a91b
commit
bcdcf2c466
|
@ -69,7 +69,7 @@ static void mlxbf_gige_initial_mac(struct mlxbf_gige *priv)
|
||||||
u8 mac[ETH_ALEN];
|
u8 mac[ETH_ALEN];
|
||||||
u64 local_mac;
|
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,
|
mlxbf_gige_get_mac_rx_filter(priv, MLXBF_GIGE_LOCAL_MAC_FILTER_IDX,
|
||||||
&local_mac);
|
&local_mac);
|
||||||
u64_to_ether_addr(local_mac, mac);
|
u64_to_ether_addr(local_mac, mac);
|
||||||
|
|
Loading…
Reference in New Issue