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 <monamagarwal123@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
3eed3d360d
commit
015851c342
1 changed files with 2 additions and 2 deletions
|
@ -3527,7 +3527,7 @@ static int et131x_pci_init(struct et131x_adapter *adapter,
|
||||||
goto err_out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
memcpy(adapter->addr, adapter->rom_addr, ETH_ALEN);
|
ether_addr_copy(adapter->addr, adapter->rom_addr);
|
||||||
out:
|
out:
|
||||||
return rc;
|
return rc;
|
||||||
err_out:
|
err_out:
|
||||||
|
@ -3774,7 +3774,7 @@ static struct et131x_adapter *et131x_adapter_init(struct net_device *netdev,
|
||||||
adapter->registry_jumbo_packet = 1514; /* 1514-9216 */
|
adapter->registry_jumbo_packet = 1514; /* 1514-9216 */
|
||||||
|
|
||||||
/* Set the MAC address to a default */
|
/* Set the MAC address to a default */
|
||||||
memcpy(adapter->addr, default_mac, ETH_ALEN);
|
ether_addr_copy(adapter->addr, default_mac);
|
||||||
|
|
||||||
return adapter;
|
return adapter;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue