Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754498AbcDCR1w (ORCPT ); Sun, 3 Apr 2016 13:27:52 -0400 Received: from mail-oi0-f46.google.com ([209.85.218.46]:35488 "EHLO mail-oi0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753644AbcDCR0h (ORCPT ); Sun, 3 Apr 2016 13:26:37 -0400 From: Moritz Fischer To: nicolas.ferre@atmel.com Cc: michal.simek@xilinx.com, joe@perches.com, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, moritz.fischer.private@gmail.com, Moritz Fischer Subject: [PATCH v3 4/5] net: macb: Use ether_addr_copy over memcpy Date: Tue, 29 Mar 2016 19:11:14 -0700 Message-Id: <1459303875-3362-5-git-send-email-moritz.fischer@ettus.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1459303875-3362-1-git-send-email-moritz.fischer@ettus.com> References: <1459303875-3362-1-git-send-email-moritz.fischer@ettus.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 784 Lines: 25 Checkpatch suggests using ether_addr_copy over memcpy to copy the mac address. Acked-by: Michal Simek Acked-by: Nicolas Ferre Signed-off-by: Moritz Fischer --- 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 2ba0934..01a8ffb 100644 --- a/drivers/net/ethernet/cadence/macb.c +++ b/drivers/net/ethernet/cadence/macb.c @@ -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); -- 2.7.4