net: freescale: slight optimization of addr compare
PATCH 2/21 net: freescale: slight optimization of addr compare
Use the recently added and possibly more efficient ether_addr_equal_unaligned to instead of memcmp.
Cc Li Yang <[email protected]>
Signed-off-by Ding Tianhong <[email protected]>
--- drivers/net/ethernet/freescale/ucc_geth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/freescale/ucc_geth.c +1 -1
@@ -437,7 +437,7 @@ static void hw_add_addr_in_hash(struct ucc_geth_private *ugeth,static inline int compare_addr (u8 **addr1,u8 **addr2) { -return memcmp (addr1, addr2,ETH_ALEN ); +return !ether_addr_equal_unaligned (addr1, addr2); }#ifdef DEBUG
Signature · 1 line
1.8.0