Commit c466a9b2 authored by dingtianhong's avatar dingtianhong Committed by David S. Miller

net: 3com: 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: default avatarDing Tianhong <dingtianhong@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 21eb2189
...@@ -252,8 +252,7 @@ static int el3_isa_id_sequence(__be16 *phys_addr) ...@@ -252,8 +252,7 @@ static int el3_isa_id_sequence(__be16 *phys_addr)
for (i = 0; i < el3_cards; i++) { for (i = 0; i < el3_cards; i++) {
struct el3_private *lp = netdev_priv(el3_devs[i]); struct el3_private *lp = netdev_priv(el3_devs[i]);
if (lp->type == EL3_PNP && if (lp->type == EL3_PNP &&
!memcmp(phys_addr, el3_devs[i]->dev_addr, ether_addr_equal(phys_addr, el3_devs[i]->dev_addr)) {
ETH_ALEN)) {
if (el3_debug > 3) if (el3_debug > 3)
pr_debug("3c509 with address %02x %02x %02x %02x %02x %02x was found by ISAPnP\n", pr_debug("3c509 with address %02x %02x %02x %02x %02x %02x was found by ISAPnP\n",
phys_addr[0] & 0xff, phys_addr[0] >> 8, phys_addr[0] & 0xff, phys_addr[0] >> 8,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment