Skip to contentSkip to conversation

: Remove duplicate assignation in dma_skb_copy_datagram_iovec

PATCH In review Sosnowski, Maciej 4 participants 5 messages Feb 29, 2008 – Jun 3, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : Remove duplicate assignation in dma_skb_copy_datagram_iovec

Dave,

This patch just removes redundant copy calculation. Please include it in the tree.

Regards,
Maciej

[I/OAT]: Remove duplicate assignation in dma_skb_copy_datagram_iovec

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

---
user_dma.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
net/core/user_dma.c +1 -1
index 0ad1cd5..c77aff9 100644
@@ -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;
 

---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
z siedziba w Gdansku
ul. Slowackiego 173
80-298 Gdansk

Sad Rejonowy Gdansk Polnoc w Gdansku,
VII Wydzial Gospodarczy Krajowego Rejestru Sadowego, numer KRS 101882

NIP 957-07-52-316
Kapital zakladowy 200.000 zl

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.

Acked-by Shannon Nelson on v1 1/1
#1 lore raw

Subject: net_dma: Remove duplicate assignment in dma_skb_copy_datagram_iovec

From: Brice Goglin <[email protected]>

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

---
Hi Maciej,

Please be careful about maintaining attribution of the patch.

Regards,
Dan

 net/core/user_dma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/core/user_dma.c +1 -1
index 0ad1cd5..c77aff9 100644
@@ -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;
 
#2 lore raw

I don't see this patch applied anywhere, what happened to it?

Brice

Quoted 44 lines · Dan Williams

Subject: net_dma: Remove duplicate assignment in dma_skb_copy_datagram_iovec

From: Brice Goglin <[email protected]>

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

---
Hi Maciej,

Please be careful about maintaining attribution of the patch.

Regards,
Dan

 net/core/user_dma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/core/user_dma.c +1 -2
index 0ad1cd5..c77aff9 100644
@@ -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;
 
 
 
--

To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw

PATCH RESEND 1/1 net_dma: remove duplicate assignment in dma_skb_copy_datagram_iovec

From: Brice Goglin <[email protected]>
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().

---

Quoted 3 lines · Brice Goglin

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(-)
net/core/user_dma.c +1 -1
index 0ad1cd5..c77aff9 100644
@@ -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;
 
maintainer Applied
#4 lore raw

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

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

Quoted 12 lines

From: Brice Goglin <[email protected]>
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().

---
On Thu, 2008-05-22 at 00:02 -0700, Brice Goglin wrote:

Quoted 7 lines
Quoted 3 lines

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.

Applied, thanks for resending.