From: Christophe JAILLET Date: Fri, 20 Sep 2019 04:56:56 +0000 (+0200) Subject: qede: qede_fp: simplify a bit 'qede_rx_build_skb()' X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=24ccb0ab95bf14e414cf2ba65af5458bc5a2e865;p=openwrt%2Fstaging%2Fblogic.git qede: qede_fp: simplify a bit 'qede_rx_build_skb()' Use 'skb_put_data()' instead of rewritting it. This improves readability. Signed-off-by: Christophe JAILLET Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/qlogic/qede/qede_fp.c b/drivers/net/ethernet/qlogic/qede/qede_fp.c index 0ae28f0d2523..004c0bfec41d 100644 --- a/drivers/net/ethernet/qlogic/qede/qede_fp.c +++ b/drivers/net/ethernet/qlogic/qede/qede_fp.c @@ -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; }