mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-06 05:02:31 +00:00
dsa: Use ether_addr_copy
Use ether_addr_copy instead of memcpy(a, b, ETH_ALEN) to save some cycles on arm and powerpc. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9ea08b1299
commit
d08f161a10
@ -156,7 +156,7 @@ static int dsa_slave_set_mac_address(struct net_device *dev, void *a)
|
||||
dev_uc_del(master, dev->dev_addr);
|
||||
|
||||
out:
|
||||
memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
|
||||
ether_addr_copy(dev->dev_addr, addr->sa_data);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user