From: dingtianhong <dingtianhong@huawei.com>
Date: Mon, 30 Dec 2013 07:41:17 +0000 (+0800)
Subject: net: renesas: slight optimization of addr compare
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c4bde29cb0f3a520e3dd666e523f9a576a47a47a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git

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>
---

diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index ca742e1f704e..2d00bce7d004 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -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;
 	}