]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
staging: octeon: Fix warning of prefer ether_addr_copy.
authorDilek Uzulmez <dilekuzulmez@gmail.com>
Tue, 7 Oct 2014 12:58:48 +0000 (15:58 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Oct 2014 02:29:13 +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 ethernet.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/octeon/ethernet.c

index 8f9e3fb4871d0870e2c88918214482775538511d..47d4277dc1abb2d296a2feda18a2992f092aa130 100644 (file)
@@ -452,7 +452,7 @@ int cvm_oct_common_init(struct net_device *dev)
                mac = of_get_mac_address(priv->of_node);
 
        if (mac)
-               memcpy(dev->dev_addr, mac, ETH_ALEN);
+               ether_addr_copy(dev->dev_addr, mac);
        else
                eth_hw_addr_random(dev);