]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
net: pcnet: slight optimization of addr compare
authordingtianhong <dingtianhong@huawei.com>
Thu, 26 Dec 2013 11:40:22 +0000 (19:40 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 26 Dec 2013 18:31:33 +0000 (13:31 -0500)
Use possibly more efficient ether_addr_equal
to instead of memcmp.

Cc: Don Fry <pcnet32@frontier.com>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/pcnet32.c

index 38492e0b704e3aab926ec5fd300b61028223d504..9339cccfe05a35977493a0fbaf766b91f49f8acb 100644 (file)
@@ -1668,7 +1668,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
        for (i = 0; i < ETH_ALEN; i++)
                promaddr[i] = inb(ioaddr + i);
 
-       if (memcmp(promaddr, dev->dev_addr, ETH_ALEN) ||
+       if (!ether_addr_equal(promaddr, dev->dev_addr) ||
            !is_valid_ether_addr(dev->dev_addr)) {
                if (is_valid_ether_addr(promaddr)) {
                        if (pcnet32_debug & NETIF_MSG_PROBE) {