From: Stephen Hemminger Date: Wed, 16 Apr 2008 23:37:32 +0000 (-0700) Subject: via-velocity: use memmove X-Git-Tag: v2.6.27-rc1~969^2~394^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=c03571a3e22b821e5be7bda7b166c4554770f489;p=linux-2.6-omap-h63xx.git via-velocity: use memmove Use memmove to handle overlapping copy of data. Signed-off-by: Stephen Hemminger Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index 3e94c8fff9e..bcbf2fa9b94 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c @@ -1527,12 +1527,8 @@ static int velocity_rx_copy(struct sk_buff **rx_skb, int pkt_size, static inline void velocity_iph_realign(struct velocity_info *vptr, struct sk_buff *skb, int pkt_size) { - /* FIXME - memmove ? */ if (vptr->flags & VELOCITY_FLAGS_IP_ALIGN) { - int i; - - for (i = pkt_size; i >= 0; i--) - *(skb->data + i + 2) = *(skb->data + i); + memmove(skb->data + 2, skb->data, pkt_size); skb_reserve(skb, 2); } }