summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Allan <bruce.w.allan@intel.com>2015-12-29 03:00:30 +0100
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2016-04-05 21:44:49 +0200
commit11c49f79b294081010f7e13a95c6b40c4d36b1de (patch)
treeb1ab562c92b1c0f9f34a1b30dd1dc74053d7832a
parentfm10k: cleanup SPACE_BEFORE_TAB checkpatch warning (diff)
downloadlinux-11c49f79b294081010f7e13a95c6b40c4d36b1de.tar.xz
linux-11c49f79b294081010f7e13a95c6b40c4d36b1de.zip
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> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/fm10k/fm10k_pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
index 60a70e9730a0..6190a81b7c32 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");