Subject: [PATCH resend] net_dma: remove duplicate assignment in dma_skb_copy_datagram_iovec

From: Dan Williams <[email-masked]>
Date: Thu, 22 May 2008 13:56:11 -0700

From: Brice Goglin <[email-masked]>
Subject: net_dma: remove duplicate assignment in dma_skb_copy_datagram_iovec

No need to compute copy twice in the frags loop in
dma_skb_copy_datagram_iovec().

Signed-off-by: Brice Goglin <[email-masked]>
Acked-by: Shannon Nelson <[email-masked]>
Signed-off-by: Maciej Sosnowski <[email-masked]>
Signed-off-by: Dan Williams <[email-masked]>
---
On Thu, 2008-05-22 at 00:02 -0700, Brice Goglin wrote:
> I don't see this patch applied anywhere, what happened to it?
>
> Brice

Hi Dave,

Looks like this patch fell by the wayside, here is a resend.

Thanks,
Dan

 net/core/user_dma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/core/user_dma.c b/net/core/user_dma.c
index 0ad1cd5..c77aff9 100644
--- a/net/core/user_dma.c
+++ b/net/core/user_dma.c
@@ -75,7 +75,7 @@ int dma_skb_copy_datagram_iovec(struct dma_chan *chan,
 
 		end = start + skb_shinfo(skb)->frags[i].size;
 		copy = end - offset;
-		if ((copy = end - offset) > 0) {
+		if (copy > 0) {
 			skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
 			struct page *page = frag->page;