diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-01 14:32:20 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-02 14:18:25 +0100 |
commit | a96d317fb1a30b9f323548eb2ff05d4e4600ead9 (patch) | |
tree | af0fc5c39eef0461e5e15a6cf2f5d9eac93fd101 /drivers/net/ethernet/broadcom/bnx2.c | |
parent | 2f23e5cef31414156c24b90e56dedc118feb9bf3 (diff) | |
download | lwn-a96d317fb1a30b9f323548eb2ff05d4e4600ead9.tar.gz lwn-a96d317fb1a30b9f323548eb2ff05d4e4600ead9.zip |
ethernet: use eth_hw_addr_set()
Convert all Ethernet drivers from memcpy(... ETH_ADDR)
to eth_hw_addr_set():
@@
expression dev, np;
@@
- memcpy(dev->dev_addr, np, ETH_ALEN)
+ eth_hw_addr_set(dev, np)
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnx2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c index 8c83973adca5..b1d7076e4c9a 100644 --- a/drivers/net/ethernet/broadcom/bnx2.c +++ b/drivers/net/ethernet/broadcom/bnx2.c @@ -8574,7 +8574,7 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) if (is_kdump_kernel()) bnx2_wait_dma_complete(bp); - memcpy(dev->dev_addr, bp->mac_addr, ETH_ALEN); + eth_hw_addr_set(dev, bp->mac_addr); dev->hw_features = NETIF_F_IP_CSUM | NETIF_F_SG | NETIF_F_TSO | NETIF_F_TSO_ECN | |