[RFC,7/8] vhost: replace rte_memcpy to fix warning

Message ID 20220607171746.461772-8-stephen@networkplumber.org (mailing list archive)
State Rejected, archived
Delegated to: David Marchand
Headers
Series Gcc-12 warning fixes |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger June 7, 2022, 5:17 p.m. UTC
  Using rte_memcpy is not needed here. Just use memcpy() which
is safer and just as fast for this non-critical place.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/vhost/vhost_crypto.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c
index b1c0eb6a0f97..e8727f076fdd 100644
--- a/lib/vhost/vhost_crypto.c
+++ b/lib/vhost/vhost_crypto.c
@@ -585,7 +585,7 @@  copy_data(void *dst_data, struct vhost_crypto_data_req *vc_req,
 	if (unlikely(!src || !dlen))
 		return -1;
 
-	rte_memcpy((uint8_t *)data, src, dlen);
+	memcpy(data, src, dlen);
 	data += dlen;
 
 	if (unlikely(dlen < to_copy)) {