staging: octeon: Fix warning of prefer ether_addr_copy.

This patch fixes the following checkpatch.pl warnings:
WARNING: "Prefer ether_addr_copy() over memcpy() if the Ethernet
addresses are __aligned(2)" in file ethernet.c
Pahole shows that the addresses are aligned.

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Dilek Uzulmez 2014-10-07 15:58:48 +03:00 committed by Greg Kroah-Hartman
parent c9a114e70a
commit 6c71ea543a

View file

@ -452,7 +452,7 @@ int cvm_oct_common_init(struct net_device *dev)
mac = of_get_mac_address(priv->of_node); mac = of_get_mac_address(priv->of_node);
if (mac) if (mac)
memcpy(dev->dev_addr, mac, ETH_ALEN); ether_addr_copy(dev->dev_addr, mac);
else else
eth_hw_addr_random(dev); eth_hw_addr_random(dev);