]> git.baikalelectronics.ru Git - kernel.git/commitdiff
crypto: chtls - simplify a bit 'create_flowc_wr_skb()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Thu, 19 Sep 2019 20:04:28 +0000 (22:04 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 4 Oct 2019 15:06:20 +0000 (01:06 +1000)
Use '__skb_put_data()' instead of rewritting it.
This improves readability.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/chelsio/chtls/chtls_io.c

index 0891ab829b1b6b1318353e945e6394fab29f7c1e..2512bfb24d712852b584cd12381870ad7a68ec2f 100644 (file)
@@ -97,7 +97,7 @@ static struct sk_buff *create_flowc_wr_skb(struct sock *sk,
        if (!skb)
                return NULL;
 
-       memcpy(__skb_put(skb, flowclen), flowc, flowclen);
+       __skb_put_data(skb, flowc, flowclen);
        skb_set_queue_mapping(skb, (csk->txq_idx << 1) | CPL_PRIORITY_DATA);
 
        return skb;