Skip to content

Commit eefb52d

Browse files
Moritz Fischerdavem330
authored andcommitted
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 <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Signed-off-by: Moritz Fischer <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent aa50b55 commit eefb52d

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/cadence

1 file changed

+1
-1
lines changed

drivers/net/ethernet/cadence/macb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2973,7 +2973,7 @@ static int macb_probe(struct platform_device *pdev)
29732973

29742974
mac = of_get_mac_address(np);
29752975
if (mac)
2976-
memcpy(bp->dev->dev_addr, mac, ETH_ALEN);
2976+
ether_addr_copy(bp->dev->dev_addr, mac);
29772977
else
29782978
macb_get_hwaddr(bp);
29792979

0 commit comments

Comments
 (0)