Skip to contentSkip to conversation

net: pcnet: slight optimization of addr compare

PATCH RESEND New Ding Tianhong 1 participant 1 message Dec 24, 2013

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

PATCH RESEND v2 3/20 net: pcnet: slight optimization of addr compare

Use possibly more efficient ether_addr_equal
to instead of memcmp.

---
 drivers/net/ethernet/amd/pcnet32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/amd/pcnet32.c +1 -1
index 38492e0..9339ccc 100644
@@ -1668,7 +1668,7 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
 	for (i = 0; i < ETH_ALEN; i++)
 		promaddr[i] = inb(ioaddr + i);
 
-	if (memcmp(promaddr, dev->dev_addr, ETH_ALEN) ||
+	if (!ether_addr_equal(promaddr, dev->dev_addr) ||
 	    !is_valid_ether_addr(dev->dev_addr)) {
 		if (is_valid_ether_addr(promaddr)) {
 			if (pcnet32_debug & NETIF_MSG_PROBE) {
Signature · 9 lines
1.8.0



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
.