fm10k: use ether_addr_copy to copy MAC address
authorBruce Allan <bruce.w.allan@intel.com>
Tue, 29 Dec 2015 02:00:30 +0000 (18:00 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 5 Apr 2016 19:44:49 +0000 (12:44 -0700)
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>
drivers/net/ethernet/intel/fm10k/fm10k_pci.c

index 60a70e9730a0e2875401a967ced298c3b02536b8..6190a81b7c3217ea9e56dfb41114fb144cb06883 100644 (file)
@@ -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");