[57/71] net/cnxk: replace use of fixed size rte_memcpy

Message ID 20240229225936.483472-58-stephen@networkplumber.org (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series replace use of fixed size rte_memcpy |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Stephen Hemminger Feb. 29, 2024, 10:58 p.m. UTC
Automatically generated by devtools/cocci/rte_memcpy.cocci

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/cnxk/cnxk_ethdev_ops.c | 2 +-
 drivers/net/cnxk/cnxk_tm.c         | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)
  

Patch

diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c
index 5de2919047c1..ee407b177ec0 100644
--- a/drivers/net/cnxk/cnxk_ethdev_ops.c
+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
@@ -451,7 +451,7 @@  cnxk_nix_mac_addr_set(struct rte_eth_dev *eth_dev, struct rte_ether_addr *addr)
 	}
 
 	/* Update mac address to cnxk ethernet device */
-	rte_memcpy(dev->mac_addr, addr->addr_bytes, RTE_ETHER_ADDR_LEN);
+	memcpy(dev->mac_addr, addr->addr_bytes, RTE_ETHER_ADDR_LEN);
 
 exit:
 	return rc;
diff --git a/drivers/net/cnxk/cnxk_tm.c b/drivers/net/cnxk/cnxk_tm.c
index c799193cb89b..5c8b0997ca7c 100644
--- a/drivers/net/cnxk/cnxk_tm.c
+++ b/drivers/net/cnxk/cnxk_tm.c
@@ -300,8 +300,7 @@  cnxk_nix_tm_shaper_profile_add(struct rte_eth_dev *eth_dev, uint32_t id,
 	profile->profile.pkt_len_adj = params->pkt_length_adjust;
 	profile->profile.pkt_mode = params->packet_mode;
 	profile->profile.free_fn = rte_free;
-	rte_memcpy(&profile->params, params,
-		   sizeof(struct rte_tm_shaper_params));
+	memcpy(&profile->params, params, sizeof(struct rte_tm_shaper_params));
 
 	rc = roc_nix_tm_shaper_profile_add(nix, &profile->profile);
 
@@ -373,7 +372,7 @@  cnxk_nix_tm_node_add(struct rte_eth_dev *eth_dev, uint32_t node_id,
 	if (!node)
 		return -ENOMEM;
 
-	rte_memcpy(&node->params, params, sizeof(struct rte_tm_node_params));
+	memcpy(&node->params, params, sizeof(struct rte_tm_node_params));
 
 	node->nix_node.id = node_id;
 	node->nix_node.parent_id = parent_node_id;