diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-01 14:32:23 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-02 14:18:25 +0100 |
commit | f3956ebb3bf06ab2266ad5ee2214aed46405810c (patch) | |
tree | 98f917e2c4534719b049b7ba2326dfd53f16516b /drivers/net/ethernet/sfc/efx_common.c | |
parent | e35b8d7dbb094c79daf920797c372911edc2d525 (diff) | |
download | lwn-f3956ebb3bf06ab2266ad5ee2214aed46405810c.tar.gz lwn-f3956ebb3bf06ab2266ad5ee2214aed46405810c.zip |
ethernet: use eth_hw_addr_set() instead of ether_addr_copy()
Convert Ethernet from ether_addr_copy() to eth_hw_addr_set():
@@
expression dev, np;
@@
- ether_addr_copy(dev->dev_addr, np)
+ 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/sfc/efx_common.c')
-rw-r--r-- | drivers/net/ethernet/sfc/efx_common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sfc/efx_common.c b/drivers/net/ethernet/sfc/efx_common.c index 896b59253197..f187631b2c5c 100644 --- a/drivers/net/ethernet/sfc/efx_common.c +++ b/drivers/net/ethernet/sfc/efx_common.c @@ -181,11 +181,11 @@ int efx_set_mac_address(struct net_device *net_dev, void *data) /* save old address */ ether_addr_copy(old_addr, net_dev->dev_addr); - ether_addr_copy(net_dev->dev_addr, new_addr); + eth_hw_addr_set(net_dev, new_addr); if (efx->type->set_mac_address) { rc = efx->type->set_mac_address(efx); if (rc) { - ether_addr_copy(net_dev->dev_addr, old_addr); + eth_hw_addr_set(net_dev, old_addr); return rc; } } |