Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754234AbcCMTLt (ORCPT ); Sun, 13 Mar 2016 15:11:49 -0400 Received: from mail-pa0-f47.google.com ([209.85.220.47]:34895 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754138AbcCMTLI (ORCPT ); Sun, 13 Mar 2016 15:11:08 -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 4/5] net: macb: Use ether_addr_copy over memcpy Date: Sun, 13 Mar 2016 12:10:46 -0700 Message-Id: <1457896247-25934-5-git-send-email-moritz.fischer@ettus.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1457896247-25934-1-git-send-email-moritz.fischer@ettus.com> References: <1457896247-25934-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: 685 Lines: 23 Checkpatch suggests using ether_addr_copy over memcpy to copy the mac address. 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 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); -- 2.4.3