* [PATCH net-next v2 12/20] net: netxen: slight optimization of addr compare
@ 2013-12-28 6:17 Ding Tianhong
0 siblings, 0 replies; only message in thread
From: Ding Tianhong @ 2013-12-28 6:17 UTC (permalink / raw)
To: Manish Chopra, Sony Chacko, Rajesh Borundia, David S. Miller,
Netdev, linux-kernel@vger.kernel.org
Use possibly more efficient ether_addr_equal
to instead of memcmp.
Cc: Manish Chopra <manish.chopra@qlogic.com>
Cc: Sony Chacko <sony.chacko@qlogic.com>
Cc: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
---
drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c
index b72b6be..db4280c 100644
--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c
+++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c
@@ -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;
}
--
1.8.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-12-28 6:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-28 6:17 [PATCH net-next v2 12/20] net: netxen: slight optimization of addr compare Ding Tianhong
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.