Skip to contentSkip to conversation

net: renesas: slight optimization of addr compare

PATCH Superseded Ding Tianhong 1 participant 1 message Dec 27, 2013

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 14/20 net: renesas: slight optimization of addr compare

Use possibly more efficient ether_addr_equal
to instead of memcmp.

Cc "David S. Miller" <[email protected]>
---
 drivers/net/ethernet/renesas/sh_eth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/renesas/sh_eth.c +1 -1
index ca742e1..2d00bce 100644
@@ -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;
 	}
 
Signature · 1 line
1.8.0