mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Moritz Fischer <moritz.fischer@ettus.com>
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 <moritz.fischer@ettus.com>
Subject: [PATCH v3 4/5] net: macb: Use ether_addr_copy over memcpy
Date: Tue, 29 Mar 2016 19:11:14 -0700	[thread overview]
Message-ID: <1459303875-3362-5-git-send-email-moritz.fischer@ettus.com> (raw)
In-Reply-To: <1459303875-3362-1-git-send-email-moritz.fischer@ettus.com>

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>
---
 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

  parent reply	other threads:[~2016-04-03 17:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-30  2:11 [PATCH v3 0/5] macb: Codingstyle cleanups Moritz Fischer
2016-03-30  2:11 ` [PATCH v3 1/5] net: macb: Fix coding style error message Moritz Fischer
2016-03-30  2:11 ` [PATCH v3 2/5] net: macb: Fix coding style warnings Moritz Fischer
2016-03-30  2:11 ` [PATCH v3 3/5] net: macb: Fix coding style suggestions Moritz Fischer
2016-03-30  2:11 ` Moritz Fischer [this message]
2016-03-30  2:11 ` [PATCH v3 5/5] net: macb: Fix simple typo Moritz Fischer
2016-04-04 20:17 ` [PATCH v3 0/5] macb: Codingstyle cleanups David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1459303875-3362-5-git-send-email-moritz.fischer@ettus.com \
    --to=moritz.fischer@ettus.com \
    --cc=davem@davemloft.net \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=moritz.fischer.private@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@atmel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®