Skip to contentSkip to conversation

crypto: chtls - simplify a bit 'create_flowc_wr_skb()'

PATCH In review Christophe JAILLET 2 participants 2 messages Sep 19, 2019 – Oct 4, 2019

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

PATCH 1/1 crypto: chtls - simplify a bit 'create_flowc_wr_skb()'

Use '__skb_put_data()' instead of rewritting it.
This improves readability.

---
 drivers/crypto/chelsio/chtls/chtls_io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/chelsio/chtls/chtls_io.c +1 -1
index 0891ab829b1b..2512bfb24d71 100644
@@ -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;
Signature · 1 line
2.20.1
maintainer
#1 lore raw
Quoted 7 lines · Christophe JAILLET

Use '__skb_put_data()' instead of rewritting it.
This improves readability.

---
 drivers/crypto/chelsio/chtls/chtls_io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt