From 6c71ea543a0f0132edbe40854b0e31bf9507af5b Mon Sep 17 00:00:00 2001 From: Dilek Uzulmez Date: Tue, 7 Oct 2014 15:58:48 +0300 Subject: [PATCH] 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 --- drivers/staging/octeon/ethernet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c index 8f9e3fb..47d4277 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); -- 2.7.4