[28/71] net/idpf: replace use of fixed size rte_memcpy

Message ID 20240229225936.483472-29-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/idpf/idpf_ethdev.c |  7 ++++---
 drivers/net/idpf/idpf_rxtx.c   | 10 ++++++----
 2 files changed, 10 insertions(+), 7 deletions(-)
  

Patch

diff --git a/drivers/net/idpf/idpf_ethdev.c b/drivers/net/idpf/idpf_ethdev.c
index 86151c9ec9fa..9cf33c4b7058 100644
--- a/drivers/net/idpf/idpf_ethdev.c
+++ b/drivers/net/idpf/idpf_ethdev.c
@@ -1088,8 +1088,8 @@  idpf_handle_virtchnl_msg(struct idpf_adapter_ext *adapter_ex)
 			return;
 		}
 
-		rte_memcpy(adapter->mbx_resp, ctlq_msg.ctx.indirect.payload->va,
-			   IDPF_DFLT_MBX_BUF_SIZE);
+		memcpy(adapter->mbx_resp, ctlq_msg.ctx.indirect.payload->va,
+		       IDPF_DFLT_MBX_BUF_SIZE);
 
 		mbx_op = rte_le_to_cpu_16(ctlq_msg.opcode);
 		vc_op = rte_le_to_cpu_32(ctlq_msg.cookie.mbx.chnl_opcode);
@@ -1202,7 +1202,8 @@  idpf_adapter_ext_init(struct rte_pci_device *pci_dev, struct idpf_adapter_ext *a
 
 	strncpy(adapter->name, pci_dev->device.name, PCI_PRI_STR_SIZE);
 
-	rte_memcpy(&base->caps, &req_caps, sizeof(struct virtchnl2_get_capabilities));
+	memcpy(&base->caps, &req_caps,
+	       sizeof(struct virtchnl2_get_capabilities));
 
 	ret = idpf_adapter_init(base);
 	if (ret != 0) {
diff --git a/drivers/net/idpf/idpf_rxtx.c b/drivers/net/idpf/idpf_rxtx.c
index 64f22355804e..da659e16531c 100644
--- a/drivers/net/idpf/idpf_rxtx.c
+++ b/drivers/net/idpf/idpf_rxtx.c
@@ -76,7 +76,7 @@  idpf_dma_zone_reserve(struct rte_eth_dev *dev, uint16_t queue_idx,
 		else
 			ring_size = RTE_ALIGN(len * sizeof(struct idpf_base_tx_desc),
 					      IDPF_DMA_MEM_ALIGN);
-		rte_memcpy(ring_name, "idpf Tx ring", sizeof("idpf Tx ring"));
+		memcpy(ring_name, "idpf Tx ring", sizeof("idpf Tx ring"));
 		break;
 	case VIRTCHNL2_QUEUE_TYPE_RX:
 		if (splitq)
@@ -85,17 +85,19 @@  idpf_dma_zone_reserve(struct rte_eth_dev *dev, uint16_t queue_idx,
 		else
 			ring_size = RTE_ALIGN(len * sizeof(struct virtchnl2_singleq_rx_buf_desc),
 					      IDPF_DMA_MEM_ALIGN);
-		rte_memcpy(ring_name, "idpf Rx ring", sizeof("idpf Rx ring"));
+		memcpy(ring_name, "idpf Rx ring", sizeof("idpf Rx ring"));
 		break;
 	case VIRTCHNL2_QUEUE_TYPE_TX_COMPLETION:
 		ring_size = RTE_ALIGN(len * sizeof(struct idpf_splitq_tx_compl_desc),
 				      IDPF_DMA_MEM_ALIGN);
-		rte_memcpy(ring_name, "idpf Tx compl ring", sizeof("idpf Tx compl ring"));
+		memcpy(ring_name, "idpf Tx compl ring",
+		       sizeof("idpf Tx compl ring"));
 		break;
 	case VIRTCHNL2_QUEUE_TYPE_RX_BUFFER:
 		ring_size = RTE_ALIGN(len * sizeof(struct virtchnl2_splitq_rx_buf_desc),
 				      IDPF_DMA_MEM_ALIGN);
-		rte_memcpy(ring_name, "idpf Rx buf ring", sizeof("idpf Rx buf ring"));
+		memcpy(ring_name, "idpf Rx buf ring",
+		       sizeof("idpf Rx buf ring"));
 		break;
 	default:
 		PMD_INIT_LOG(ERR, "Invalid queue type");