Skip to contentSkip to conversation

igb: double increment nr_frags

PATCH Applied Jeff Kirsher 2 participants 4 messages Apr 27, 2010

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

PATCH 1/2 igb: double increment nr_frags

From: Koki Sanagi <[email protected]>

There is no need to increment nr_frags because skb_fill_page_desc increments it.

---

 drivers/net/igb/igb_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/igb/igb_main.c +1 -1
index c19b1e0..a14303a 100644
@@ -5248,7 +5248,7 @@ static bool igb_clean_rx_irq_adv(struct igb_q_vector *q_vector,
 				       PAGE_SIZE / 2, PCI_DMA_FROMDEVICE);
 			buffer_info->page_dma = 0;
 
-			skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags++,
+			skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
 						buffer_info->page,
 						buffer_info->page_offset,
 						length);
#1 lore raw

PATCH 2/2 igbvf: double increment nr_frags

From: Koki Sanagi <[email protected]>

There is no need to increment nr_frags because skb_fill_page_desc increments it.

---

 drivers/net/igbvf/netdev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/igbvf/netdev.c +1 -1
index cc23090..9ac3f94 100644
@@ -289,7 +289,7 @@ static bool igbvf_clean_rx_irq(struct igbvf_adapter *adapter,
 			               PCI_DMA_FROMDEVICE);
 			buffer_info->page_dma = 0;
 
-			skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags++,
+			skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
 			                   buffer_info->page,
 			                   buffer_info->page_offset,
 			                   length);