diff mbox

[next-queue] fm10k: use ether_addr_copy to copy MAC address

Message ID 20151229020030.2327.78167.stgit@bwallan-smackover2.jf.intel.com
State Accepted
Delegated to: Jeff Kirsher
Headers show

Commit Message

Allan, Bruce W Dec. 29, 2015, 2 a.m. UTC
Cleanup the remaining instances of using memcpy() instead of the preferred
ether_addr_copy().

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
---
 drivers/net/ethernet/intel/fm10k/fm10k_pci.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Singh, Krishneil K Feb. 2, 2016, 10:27 p.m. UTC | #1
-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces@lists.osuosl.org] On Behalf Of Bruce Allan
Sent: Monday, December 28, 2015 6:01 PM
To: intel-wired-lan@lists.osuosl.org
Subject: [Intel-wired-lan] [next-queue PATCH] fm10k: use ether_addr_copy to copy MAC address

Cleanup the remaining instances of using memcpy() instead of the preferred ether_addr_copy().

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
---


Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
diff mbox

Patch

diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
index 60a70e9..6190a81 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
@@ -1776,8 +1776,8 @@  static int fm10k_sw_init(struct fm10k_intfc *interface,
 		netdev->addr_assign_type |= NET_ADDR_RANDOM;
 	}
 
-	memcpy(netdev->dev_addr, hw->mac.addr, netdev->addr_len);
-	memcpy(netdev->perm_addr, hw->mac.addr, netdev->addr_len);
+	ether_addr_copy(netdev->dev_addr, hw->mac.addr);
+	ether_addr_copy(netdev->perm_addr, hw->mac.addr);
 
 	if (!is_valid_ether_addr(netdev->perm_addr)) {
 		dev_err(&pdev->dev, "Invalid MAC Address\n");