From: dingtianhong Date: Mon, 30 Dec 2013 07:41:21 +0000 (+0800) Subject: net: seeq: slight optimization of addr compare X-Git-Tag: v3.14-rc1~94^2~340^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9116d7b06d32946d345b7f0423a5b0b6a9b040f7;p=platform%2Fkernel%2Flinux-exynos.git net: seeq: slight 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/seeq/sgiseeq.c b/drivers/net/ethernet/seeq/sgiseeq.c index c765718..ced5b13 100644 --- a/drivers/net/ethernet/seeq/sgiseeq.c +++ b/drivers/net/ethernet/seeq/sgiseeq.c @@ -356,7 +356,7 @@ static inline void sgiseeq_rx(struct net_device *dev, struct sgiseeq_private *sp if (pkt_status & SEEQ_RSTAT_FIG) { /* Packet is OK. */ /* We don't want to receive our own packets */ - if (memcmp(rd->skb->data + 6, dev->dev_addr, ETH_ALEN)) { + if (!ether_addr_equal(rd->skb->data + 6, dev->dev_addr)) { if (len > rx_copybreak) { skb = rd->skb; newskb = netdev_alloc_skb(dev, PKT_BUF_SZ);