From: Moritz Fischer Date: Wed, 30 Mar 2016 02:11:14 +0000 (-0700) Subject: net: macb: Use ether_addr_copy over memcpy X-Git-Tag: v4.7-rc1~154^2~358^2~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=eefb52d1ec8eb1354ff1bf55811a0da74bffccb8;p=karo-tx-linux.git net: macb: Use ether_addr_copy over memcpy Checkpatch suggests using ether_addr_copy over memcpy to copy the mac address. Acked-by: Michal Simek Acked-by: Nicolas Ferre Signed-off-by: Moritz Fischer Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c index 2ba0934e52dc..01a8ffbfc464 100644 --- a/drivers/net/ethernet/cadence/macb.c +++ b/drivers/net/ethernet/cadence/macb.c @@ -2973,7 +2973,7 @@ static int macb_probe(struct platform_device *pdev) mac = of_get_mac_address(np); if (mac) - memcpy(bp->dev->dev_addr, mac, ETH_ALEN); + ether_addr_copy(bp->dev->dev_addr, mac); else macb_get_hwaddr(bp);