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

Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/sh_eth.c

index ca742e1f704e027ba0b4651c98e94fd26148c590..2d00bce7d0047d2626d87e038d2fadd3bdbfe429 100644 (file)
@@ -2207,7 +2207,7 @@ static int sh_eth_tsu_find_entry(struct net_device *ndev, const u8 *addr)
 
        for (i = 0; i < SH_ETH_TSU_CAM_ENTRIES; i++, reg_offset += 8) {
                sh_eth_tsu_read_entry(reg_offset, c_addr);
-               if (memcmp(addr, c_addr, ETH_ALEN) == 0)
+               if (ether_addr_equal(addr, c_addr))
                        return i;
        }