[61/71] net/e1000: replace use of fixed size rte_memcpy

Message ID 20240229225936.483472-62-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/e1000/igb_flow.c | 22 ++++++++++------------
 drivers/net/e1000/igb_pf.c   |  6 +++---
 2 files changed, 13 insertions(+), 15 deletions(-)
  

Patch

diff --git a/drivers/net/e1000/igb_flow.c b/drivers/net/e1000/igb_flow.c
index ea9b290e1cb5..8bca48496035 100644
--- a/drivers/net/e1000/igb_flow.c
+++ b/drivers/net/e1000/igb_flow.c
@@ -1484,9 +1484,9 @@  igb_flow_create(struct rte_eth_dev *dev,
 				goto out;
 			}
 
-			rte_memcpy(&ntuple_filter_ptr->filter_info,
-				&ntuple_filter,
-				sizeof(struct rte_eth_ntuple_filter));
+			memcpy(&ntuple_filter_ptr->filter_info,
+			       &ntuple_filter,
+			       sizeof(struct rte_eth_ntuple_filter));
 			TAILQ_INSERT_TAIL(&igb_filter_ntuple_list,
 				ntuple_filter_ptr, entries);
 			flow->rule = ntuple_filter_ptr;
@@ -1511,9 +1511,9 @@  igb_flow_create(struct rte_eth_dev *dev,
 				goto out;
 			}
 
-			rte_memcpy(&ethertype_filter_ptr->filter_info,
-				&ethertype_filter,
-				sizeof(struct rte_eth_ethertype_filter));
+			memcpy(&ethertype_filter_ptr->filter_info,
+			       &ethertype_filter,
+			       sizeof(struct rte_eth_ethertype_filter));
 			TAILQ_INSERT_TAIL(&igb_filter_ethertype_list,
 				ethertype_filter_ptr, entries);
 			flow->rule = ethertype_filter_ptr;
@@ -1536,9 +1536,8 @@  igb_flow_create(struct rte_eth_dev *dev,
 				goto out;
 			}
 
-			rte_memcpy(&syn_filter_ptr->filter_info,
-				&syn_filter,
-				sizeof(struct rte_eth_syn_filter));
+			memcpy(&syn_filter_ptr->filter_info, &syn_filter,
+			       sizeof(struct rte_eth_syn_filter));
 			TAILQ_INSERT_TAIL(&igb_filter_syn_list,
 				syn_filter_ptr,
 				entries);
@@ -1562,9 +1561,8 @@  igb_flow_create(struct rte_eth_dev *dev,
 				goto out;
 			}
 
-			rte_memcpy(&flex_filter_ptr->filter_info,
-				&flex_filter,
-				sizeof(struct igb_flex_filter));
+			memcpy(&flex_filter_ptr->filter_info, &flex_filter,
+			       sizeof(struct igb_flex_filter));
 			TAILQ_INSERT_TAIL(&igb_filter_flex_list,
 				flex_filter_ptr, entries);
 			flow->rule = flex_filter_ptr;
diff --git a/drivers/net/e1000/igb_pf.c b/drivers/net/e1000/igb_pf.c
index c7588ea57eaa..7e2ea3bdbcc1 100644
--- a/drivers/net/e1000/igb_pf.c
+++ b/drivers/net/e1000/igb_pf.c
@@ -290,7 +290,7 @@  igb_vf_reset(struct rte_eth_dev *dev, uint16_t vf, uint32_t *msgbuf)
 
 	/* reply to reset with ack and vf mac address */
 	msgbuf[0] = E1000_VF_RESET | E1000_VT_MSGTYPE_ACK;
-	rte_memcpy(new_mac, vf_mac, RTE_ETHER_ADDR_LEN);
+	memcpy(new_mac, vf_mac, RTE_ETHER_ADDR_LEN);
 	e1000_write_mbx(hw, msgbuf, 3, vf);
 
 	return 0;
@@ -308,8 +308,8 @@  igb_vf_set_mac_addr(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
 
 	if (rte_is_unicast_ether_addr((struct rte_ether_addr *)new_mac)) {
 		if (!rte_is_zero_ether_addr((struct rte_ether_addr *)new_mac))
-			rte_memcpy(vfinfo[vf].vf_mac_addresses, new_mac,
-				sizeof(vfinfo[vf].vf_mac_addresses));
+			memcpy(vfinfo[vf].vf_mac_addresses, new_mac,
+			       sizeof(vfinfo[vf].vf_mac_addresses));
 		hw->mac.ops.rar_set(hw, new_mac, rar_entry);
 		rah = E1000_READ_REG(hw, E1000_RAH(rar_entry));
 		rah |= (0x1 << (E1000_RAH_POOLSEL_SHIFT + vf));