diff options
author | Joe Perches <joe@perches.com> | 2014-01-20 12:52:20 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-21 21:13:05 -0500 |
commit | d08f161a10006491d5835702bff2a12c91fb0cdd (patch) | |
tree | 8e1fd6d5ebb3e1450cb3a842d14f09a5cac7d979 /net | |
parent | 9ea08b129962d1df3a574bf0ce89af0dfac2a241 (diff) |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/dsa/slave.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 29d684ebca6a..02c0e1716f64 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) | |||
156 | dev_uc_del(master, dev->dev_addr); | 156 | dev_uc_del(master, dev->dev_addr); |
157 | 157 | ||
158 | out: | 158 | out: |
159 | memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN); | 159 | ether_addr_copy(dev->dev_addr, addr->sa_data); |
160 | 160 | ||
161 | return 0; | 161 | return 0; |
162 | } | 162 | } |