From: Dilek Uzulmez Date: Tue, 7 Oct 2014 12:58:48 +0000 (+0300) Subject: staging: octeon: Fix warning of prefer ether_addr_copy. X-Git-Tag: firefly_0821_release~176^2~2665^2~1253 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6c71ea543a0f0132edbe40854b0e31bf9507af5b;p=firefly-linux-kernel-4.4.55.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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c index 8f9e3fb4871d..47d4277dc1ab 100644 --- a/drivers/staging/octeon/ethernet.c +++ b/drivers/staging/octeon/ethernet.c @@ -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);