From d08f161a10006491d5835702bff2a12c91fb0cdd Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Mon, 20 Jan 2014 09:52:20 -0800 Subject: 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 Signed-off-by: David S. Miller diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 29d684e..02c0e17 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -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; } -- cgit v0.10.2