mirror of https://gitee.com/openkylin/linux.git
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:
parent
c9a114e70a
commit
6c71ea543a
|
@ -452,7 +452,7 @@ int cvm_oct_common_init(struct net_device *dev)
|
|||
mac = of_get_mac_address(priv->of_node);
|
||||
|
||||
if (mac)
|
||||
memcpy(dev->dev_addr, mac, ETH_ALEN);
|
||||
ether_addr_copy(dev->dev_addr, mac);
|
||||
else
|
||||
eth_hw_addr_random(dev);
|
||||
|
||||
|
|
Loading…
Reference in New Issue