Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: ti: 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: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

dingtianhong and committed by
David S. Miller
d9f394fe 00fa4ce9

+1 -1
+1 -1
drivers/net/ethernet/ti/cpsw_ale.c
··· 163 163 if (cpsw_ale_get_vlan_id(ale_entry) != vid) 164 164 continue; 165 165 cpsw_ale_get_addr(ale_entry, entry_addr); 166 - if (memcmp(entry_addr, addr, 6) == 0) 166 + if (ether_addr_equal(entry_addr, addr)) 167 167 return idx; 168 168 } 169 169 return -ENOENT;