Skip to content

Commit

Permalink
dsa: Use ether_addr_copy
Browse files Browse the repository at this point in the history
Use ether_addr_copy instead of memcpy(a, b, ETH_ALEN) to
save some cycles on arm and powerpc.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
JoePerches authored and davem330 committed Jan 22, 2014
1 parent 9ea08b1 commit d08f161
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/dsa/slave.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d08f161

Please sign in to comment.