Skip to contentSkip to conversation

net: netxen: slight optimization of addr compare

PATCH In review Ding Tianhong 1 participant 1 message Dec 30, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v3 12/19 net: netxen: slight optimization of addr compare

Use possibly more efficient ether_addr_equal to instead of memcmp.

Cc Manish Chopra <[email protected]>
Cc Sony Chacko <[email protected]>
Cc Rajesh Borundia <[email protected]>
---
 drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c +1 -1
index b72b6be..db4280c 100644
@@ -661,7 +661,7 @@ static int nx_p3_nic_add_mac(struct netxen_adapter *adapter,
 	list_for_each(head, del_list) {
 		cur = list_entry(head, nx_mac_list_t, list);
 
-		if (memcmp(addr, cur->mac_addr, ETH_ALEN) == 0) {
+		if (ether_addr_equal(addr, cur->mac_addr)) {
 			list_move_tail(head, &adapter->mac_list);
 			return 0;
 		}
Signature · 1 line
1.8.0