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/sun/sunhme.c | |
parent | 2f23e5cef31414156c24b90e56dedc118feb9bf3 (diff) | |
download | linux-a96d317fb1a30b9f323548eb2ff05d4e4600ead9.tar.bz2 |
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/sun/sunhme.c')
-rw-r--r-- | drivers/net/ethernet/sun/sunhme.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c index 62f81b0d14ed..fe5482b1872f 100644 --- a/drivers/net/ethernet/sun/sunhme.c +++ b/drivers/net/ethernet/sun/sunhme.c @@ -2707,9 +2707,9 @@ static int happy_meal_sbus_probe_one(struct platform_device *op, int is_qfe) addr = of_get_property(dp, "local-mac-address", &len); if (qfe_slot != -1 && addr && len == ETH_ALEN) - memcpy(dev->dev_addr, addr, ETH_ALEN); + eth_hw_addr_set(dev, addr); else - memcpy(dev->dev_addr, idprom->id_ethaddr, ETH_ALEN); + eth_hw_addr_set(dev, idprom->id_ethaddr); } hp = netdev_priv(dev); @@ -3055,9 +3055,9 @@ static int happy_meal_pci_probe(struct pci_dev *pdev, (addr = of_get_property(dp, "local-mac-address", &len)) != NULL && len == 6) { - memcpy(dev->dev_addr, addr, ETH_ALEN); + eth_hw_addr_set(dev, addr); } else { - memcpy(dev->dev_addr, idprom->id_ethaddr, ETH_ALEN); + eth_hw_addr_set(dev, idprom->id_ethaddr); } #else get_hme_mac_nonsparc(pdev, &dev->dev_addr[0]); |