qede: qede_fp: simplify a bit 'qede_rx_build_skb()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 20 Sep 2019 04:56:56 +0000 (06:56 +0200)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Sun, 22 Sep 2019 03:15:03 +0000 (20:15 -0700)
Use 'skb_put_data()' instead of rewritting it.
This improves readability.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
drivers/net/ethernet/qlogic/qede/qede_fp.c

index 0ae28f0d2523069cb035f45454f928b2c398b418..004c0bfec41d796710a832f5e545271c138638ce 100644 (file)
@@ -779,8 +779,7 @@ qede_rx_build_skb(struct qede_dev *edev,
                        return NULL;
 
                skb_reserve(skb, pad);
-               memcpy(skb_put(skb, len),
-                      page_address(bd->data) + offset, len);
+               skb_put_data(skb, page_address(bd->data) + offset, len);
                qede_reuse_page(rxq, bd);
                goto out;
        }