net: macb: Use ether_addr_copy over memcpy
authorMoritz Fischer <moritz.fischer@ettus.com>
Wed, 30 Mar 2016 02:11:14 +0000 (19:11 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Apr 2016 20:16:36 +0000 (16:16 -0400)
Checkpatch suggests using ether_addr_copy over memcpy
to copy the mac address.

Acked-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cadence/macb.c

index 2ba0934..01a8ffb 100644 (file)
@@ -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);