Thread (18 messages) flat view 18 messages, 3 authors, 2016-03-16

Re: [PATCH 4/5] net: macb: Use ether_addr_copy over memcpy

From: Nicolas Ferre <hidden>
Date: 2016-03-16 13:48:06
Also in: lkml

Le 13/03/2016 20:10, Moritz Fischer a écrit :
Checkpatch suggests using ether_addr_copy over memcpy
to copy the mac address.

Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Yes:
Acked-by: Nicolas Ferre <redacted>
quoted hunk ↗ jump to hunk
---
 drivers/net/ethernet/cadence/macb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
index 53400f6..a0c01e5 100644
--- a/drivers/net/ethernet/cadence/macb.c
+++ b/drivers/net/ethernet/cadence/macb.c
@@ -2891,7 +2891,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);
 

-- 
Nicolas Ferre
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help