Skip to content

Commit

Permalink
net: macb: Use ether_addr_copy over memcpy
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Moritz Fischer authored and David S. Miller committed Apr 4, 2016
1 parent aa50b55 commit eefb52d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/cadence/macb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit eefb52d

Please sign in to comment.