projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ea08b1
)
dsa: Use ether_addr_copy
author
Joe Perches
<joe@perches.com>
Mon, 20 Jan 2014 17:52:20 +0000
(09:52 -0800)
committer
David S. Miller
<davem@davemloft.net>
Wed, 22 Jan 2014 02:13:05 +0000
(18:13 -0800)
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>
net/dsa/slave.c
patch
|
blob
|
history
diff --git
a/net/dsa/slave.c
b/net/dsa/slave.c
index 29d684ebca6a83d3c29482f82c68d002b80baf79..02c0e1716f641c947a5b906ee82c755e568a4a7c 100644
(file)
--- 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;
}