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 2ba0934e52dcc6167a9814dd903675bd6b343083..01a8ffbfc4646c65f216dbef9eb63ca2d0d4a974 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);