net: renesas: slight optimization of addr compare

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>
This commit is contained in:
dingtianhong 2013-12-30 15:41:17 +08:00 committed by David S. Miller
parent 6878f79a8b
commit c4bde29cb0
1 changed files with 1 additions and 1 deletions

View 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;
}