[v4,22/30] mempool: replace use of fixed size rte_memcpy

Message ID 20240405165518.367503-23-stephen@networkplumber.org (mailing list archive)
State Superseded
Delegated to: Thomas Monjalon
Headers
Series replace use of rte_memcpy with fixed sizes |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger April 5, 2024, 4:53 p.m. UTC
  Automatically generated by devtools/cocci/rte_memcpy.cocci

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/mempool/dpaa/dpaa_mempool.c      | 4 ++--
 drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 5 ++---
 2 files changed, 4 insertions(+), 5 deletions(-)
  

Patch

diff --git a/drivers/mempool/dpaa/dpaa_mempool.c b/drivers/mempool/dpaa/dpaa_mempool.c
index 0b484b3d9c..f72b51b472 100644
--- a/drivers/mempool/dpaa/dpaa_mempool.c
+++ b/drivers/mempool/dpaa/dpaa_mempool.c
@@ -115,8 +115,8 @@  dpaa_mbuf_create_pool(struct rte_mempool *mp)
 		return -ENOMEM;
 	}
 
-	rte_memcpy(bp_info, (void *)&rte_dpaa_bpid_info[bpid],
-		   sizeof(struct dpaa_bp_info));
+	memcpy(bp_info, (void *)&rte_dpaa_bpid_info[bpid],
+	       sizeof(struct dpaa_bp_info));
 	mp->pool_data = (void *)bp_info;
 
 	DPAA_MEMPOOL_INFO("BMAN pool created for bpid =%d", bpid);
diff --git a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
index 4c9245cb81..c711de30e8 100644
--- a/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
+++ b/drivers/mempool/dpaa2/dpaa2_hw_mempool.c
@@ -16,7 +16,6 @@ 
 #include <rte_mbuf.h>
 #include <ethdev_driver.h>
 #include <rte_malloc.h>
-#include <rte_memcpy.h>
 #include <rte_string_fns.h>
 #include <rte_cycles.h>
 #include <rte_kvargs.h>
@@ -125,8 +124,8 @@  rte_hw_mbuf_create_pool(struct rte_mempool *mp)
 	rte_dpaa2_bpid_info[bpid].bp_list = bp_list;
 	rte_dpaa2_bpid_info[bpid].bpid = bpid;
 
-	rte_memcpy(bp_info, (void *)&rte_dpaa2_bpid_info[bpid],
-		   sizeof(struct dpaa2_bp_info));
+	memcpy(bp_info, (void *)&rte_dpaa2_bpid_info[bpid],
+	       sizeof(struct dpaa2_bp_info));
 	mp->pool_data = (void *)bp_info;
 
 	DPAA2_MEMPOOL_DEBUG("BP List created for bpid =%d", dpbp_attr.bpid);