Skip to content

Commit

Permalink
qede: Remove a erroneous ++ in 'qede_rx_build_jumbo()'
Browse files Browse the repository at this point in the history
This ++ is confusing. It looks duplicated with the one already performed in
'skb_fill_page_desc()'.

In fact, it is harmless. 'nr_frags' is written twice with the same value.
Once, because of the nr_frags++, and once because of the 'nr_frags = i + 1'
in 'skb_fill_page_desc()'.

So axe this post-increment to avoid confusion.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Manish Chopra <manishc@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Christophe JAILLET authored and David S. Miller committed Apr 5, 2021
1 parent c438a80 commit 1ec3d02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/qlogic/qede/qede_fp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@ static int qede_rx_build_jumbo(struct qede_dev *edev,
dma_unmap_page(rxq->dev, bd->mapping,
PAGE_SIZE, DMA_FROM_DEVICE);

skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags++,
skb_fill_page_desc(skb, skb_shinfo(skb)->nr_frags,
bd->data, rxq->rx_headroom, cur_size);

skb->truesize += PAGE_SIZE;
Expand Down

0 comments on commit 1ec3d02

Please sign in to comment.