[PATCH net-next v2 01/20] net: 3com: slight optimization of addr compare

2013-12-27 Thread Ding Tianhong
Use possibly more efficient ether_addr_equal
to instead of memcmp.

Cc: "David S. Miller" 
Signed-off-by: Ding Tianhong 
---
 drivers/net/ethernet/3com/3c509.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/3com/3c509.c 
b/drivers/net/ethernet/3com/3c509.c
index ede8daa..9142b47 100644
--- a/drivers/net/ethernet/3com/3c509.c
+++ b/drivers/net/ethernet/3com/3c509.c
@@ -252,8 +252,7 @@ static int el3_isa_id_sequence(__be16 *phys_addr)
for (i = 0; i < el3_cards; i++) {
struct el3_private *lp = netdev_priv(el3_devs[i]);
if (lp->type == EL3_PNP &&
-   !memcmp(phys_addr, el3_devs[i]->dev_addr,
-   ETH_ALEN)) {
+   ether_addr_equal(phys_addr, el3_devs[i]->dev_addr)) 
{
if (el3_debug > 3)
pr_debug("3c509 with address %02x %02x 
%02x %02x %02x %02x was found by ISAPnP\n",
phys_addr[0] & 0xff, 
phys_addr[0] >> 8,
-- 
1.8.0


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH net-next v2 01/20] net: 3com: slight optimization of addr compare

2013-12-27 Thread Ding Tianhong
Use possibly more efficient ether_addr_equal
to instead of memcmp.

Cc: David S. Miller da...@davemloft.net
Signed-off-by: Ding Tianhong dingtianh...@huawei.com
---
 drivers/net/ethernet/3com/3c509.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/3com/3c509.c 
b/drivers/net/ethernet/3com/3c509.c
index ede8daa..9142b47 100644
--- a/drivers/net/ethernet/3com/3c509.c
+++ b/drivers/net/ethernet/3com/3c509.c
@@ -252,8 +252,7 @@ static int el3_isa_id_sequence(__be16 *phys_addr)
for (i = 0; i  el3_cards; i++) {
struct el3_private *lp = netdev_priv(el3_devs[i]);
if (lp-type == EL3_PNP 
-   !memcmp(phys_addr, el3_devs[i]-dev_addr,
-   ETH_ALEN)) {
+   ether_addr_equal(phys_addr, el3_devs[i]-dev_addr)) 
{
if (el3_debug  3)
pr_debug(3c509 with address %02x %02x 
%02x %02x %02x %02x was found by ISAPnP\n,
phys_addr[0]  0xff, 
phys_addr[0]  8,
-- 
1.8.0


--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/