Skip to content

Commit 11c49f7

Browse files
bwallanJeff Kirsher
authored andcommitted
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 <[email protected]> Tested-by: Krishneil Singh <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 1905add commit 11c49f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/intel/fm10k/fm10k_pci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1776,8 +1776,8 @@ static int fm10k_sw_init(struct fm10k_intfc *interface,
17761776
netdev->addr_assign_type |= NET_ADDR_RANDOM;
17771777
}
17781778

1779-
memcpy(netdev->dev_addr, hw->mac.addr, netdev->addr_len);
1780-
memcpy(netdev->perm_addr, hw->mac.addr, netdev->addr_len);
1779+
ether_addr_copy(netdev->dev_addr, hw->mac.addr);
1780+
ether_addr_copy(netdev->perm_addr, hw->mac.addr);
17811781

17821782
if (!is_valid_ether_addr(netdev->perm_addr)) {
17831783
dev_err(&pdev->dev, "Invalid MAC Address\n");

0 commit comments

Comments
 (0)