net: pcnet: slight optimization of addr compare
Subsystems (3)
PATCH v3 2/19 net: pcnet: slight optimization of addr compare
Use possibly more efficient ether_addr_equal
to instead of memcmp.
Cc Don Fry <[email protected]>
Signed-off-by Ding Tianhong <[email protected]>
--- drivers/net/ethernet/amd/pcnet32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/amd/pcnet32.c +1 -1
@@ -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 · 1 line
1.8.0