]> Pileus Git - ~andy/linux/commitdiff
net: vxge: slight optimization of addr compare
authordingtianhong <dingtianhong@huawei.com>
Mon, 30 Dec 2013 07:41:02 +0000 (15:41 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 31 Dec 2013 21:48:31 +0000 (16:48 -0500)
Use possibly more efficient ether_addr_equal
to instead of memcmp.

Cc: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/neterion/vxge/vxge-main.c

index 11b1c70df2b80e6963cfe6fddd7831ae3c7be299..6eae2168fff92419dfc3b2148bcdd844df653340 100644 (file)
@@ -1430,7 +1430,7 @@ vxge_search_mac_addr_in_da_table(struct vxge_vpath *vpath, struct macInfo *mac)
                return status;
        }
 
-       while (memcmp(mac->macaddr, macaddr, ETH_ALEN)) {
+       while (!ether_addr_equal(mac->macaddr, macaddr)) {
                status = vxge_hw_vpath_mac_addr_get_next(vpath->handle,
                                macaddr, macmask);
                if (status != VXGE_HW_OK)