]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: vt6655: Use ether_addr_copy function
authorDilek Uzulmez <dilekuzulmez@gmail.com>
Thu, 9 Oct 2014 19:46:32 +0000 (22:46 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Oct 2014 02:29:28 +0000 (10:29 +0800)
This patch fixes the following checkpatch.pl warnings:
WARNING: "Prefer ether_addr_copy() over memcpy() if the Ethernet
addresses are __aligned(2)" in file device_main.c
Pahole shows that the addresses are aligned

Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6655/device_main.c

index 3eb8e5c5366e79c24d3cdd93924b66e9c297daac..ed5e712370074810449ebae3f6eed356a76cdb4b 100644 (file)
@@ -1591,7 +1591,7 @@ static int  device_open(struct net_device *dev)
        device_init_registers(pDevice);
 
        MACvReadEtherAddress(pDevice->PortOffset, pDevice->abyCurrentNetAddr);
-       memcpy(pDevice->pMgmt->abyMACAddr, pDevice->abyCurrentNetAddr, ETH_ALEN);
+       ether_addr_copy(pDevice->pMgmt->abyMACAddr, pDevice->abyCurrentNetAddr);
        device_set_multi(pDevice->dev);
 
        // Init for Key Management