Skip to contentSkip to conversation

fm10k: use ether_addr_copy to copy MAC address

PATCH New Bruce Allan 2 participants 2 messages Dec 29, 2015 – Feb 2, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fm10k: use ether_addr_copy to copy MAC address

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

---
 drivers/net/ethernet/intel/fm10k/fm10k_pci.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/fm10k/fm10k_pci.c +2 -2
index 60a70e9..6190a81 100644
@@ -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");
#1 lore raw

PATCH 1/1 fm10k: use ether_addr_copy to copy MAC address

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Bruce Allan
Sent: Monday, December 28, 2015 6:01 PM
To: [email protected]
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().

---