From: dingtianhong Date: Mon, 30 Dec 2013 07:40:40 +0000 (+0800) Subject: net: enic: slight optimization of addr compare X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9130ac61a5a909f6e463a18abafa99d4a2b5842f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git net: enic: slight optimization of addr compare Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: Christian Benvenuti Cc: Sujith Sankar Cc: Govindarajulu Varadarajan Cc: Neel Patel Cc: Nishank Trivedi Signed-off-by: Ding Tianhong Acked-by: Govindarajulu Varadarajan Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/cisco/enic/enic_pp.c b/drivers/net/ethernet/cisco/enic/enic_pp.c index 43464f0a4f99..e6a83198c3dd 100644 --- a/drivers/net/ethernet/cisco/enic/enic_pp.c +++ b/drivers/net/ethernet/cisco/enic/enic_pp.c @@ -162,7 +162,7 @@ static int enic_are_pp_different(struct enic_port_profile *pp1, return strcmp(pp1->name, pp2->name) | !!memcmp(pp1->instance_uuid, pp2->instance_uuid, PORT_UUID_MAX) | !!memcmp(pp1->host_uuid, pp2->host_uuid, PORT_UUID_MAX) | - !!memcmp(pp1->mac_addr, pp2->mac_addr, ETH_ALEN); + !ether_addr_equal(pp1->mac_addr, pp2->mac_addr); } static int enic_pp_preassociate(struct enic *enic, int vf,