From: Monam Agarwal Date: Sat, 8 Mar 2014 14:23:07 +0000 (+0530) Subject: Staging: et131x: Fix warning of prefer ether_addr_copy() in et131x.c X-Git-Tag: MMI-PSA29.97-13-9~12500^2~495 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=015851c342021661b0787de5de0ce6aec00ee46b;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Staging: et131x: Fix warning of prefer ether_addr_copy() in et131x.c This patch fixes the following checkpatch.pl warnings: WARNING: "Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)". I used pahole to see whether addresses are aligned. Signed-off-by: Monam Agarwal Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c index cc600df69ec6..d329cf314360 100644 --- a/drivers/staging/et131x/et131x.c +++ b/drivers/staging/et131x/et131x.c @@ -3527,7 +3527,7 @@ static int et131x_pci_init(struct et131x_adapter *adapter, goto err_out; } } - memcpy(adapter->addr, adapter->rom_addr, ETH_ALEN); + ether_addr_copy(adapter->addr, adapter->rom_addr); out: return rc; err_out: @@ -3774,7 +3774,7 @@ static struct et131x_adapter *et131x_adapter_init(struct net_device *netdev, adapter->registry_jumbo_packet = 1514; /* 1514-9216 */ /* Set the MAC address to a default */ - memcpy(adapter->addr, default_mac, ETH_ALEN); + ether_addr_copy(adapter->addr, default_mac); return adapter; }