From: dingtianhong Date: Mon, 30 Dec 2013 07:41:24 +0000 (+0800) Subject: net: sun: optimization of addr compare X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=00fa4ce9fde7372f033133ada9cf166837ca7479;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git net: sun: optimization of addr compare Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: "David S. Miller" Signed-off-by: Ding Tianhong Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c index 3df56840a3b9..1c24a8f368bd 100644 --- a/drivers/net/ethernet/sun/sunvnet.c +++ b/drivers/net/ethernet/sun/sunvnet.c @@ -751,7 +751,7 @@ static struct vnet_mcast_entry *__vnet_mc_find(struct vnet *vp, u8 *addr) struct vnet_mcast_entry *m; for (m = vp->mcast_list; m; m = m->next) { - if (!memcmp(m->addr, addr, ETH_ALEN)) + if (ether_addr_equal(m->addr, addr)) return m; } return NULL;