[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL V2 10/44] e1000: Use memcpy to intialize registers
From: |
Jason Wang |
Subject: |
[PULL V2 10/44] e1000: Use memcpy to intialize registers |
Date: |
Fri, 10 Mar 2023 17:34:52 +0800 |
From: Akihiko Odaki <akihiko.odaki@daynix.com>
Use memcpy instead of memmove to initialize registers. The initial
register templates and register table instances will never overlap.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
hw/net/e1000.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index d9d048f..3353a37 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -390,10 +390,10 @@ static void e1000_reset(void *opaque)
d->mit_irq_level = 0;
d->mit_ide = 0;
memset(d->phy_reg, 0, sizeof d->phy_reg);
- memmove(d->phy_reg, phy_reg_init, sizeof phy_reg_init);
+ memcpy(d->phy_reg, phy_reg_init, sizeof phy_reg_init);
d->phy_reg[MII_PHYID2] = edc->phy_id2;
memset(d->mac_reg, 0, sizeof d->mac_reg);
- memmove(d->mac_reg, mac_reg_init, sizeof mac_reg_init);
+ memcpy(d->mac_reg, mac_reg_init, sizeof mac_reg_init);
d->rxbuf_min_shift = 1;
memset(&d->tx, 0, sizeof d->tx);
--
2.7.4
- [PULL V2 00/44] Net patches, Jason Wang, 2023/03/10
- [PULL V2 01/44] e1000e: Fix the code style, Jason Wang, 2023/03/10
- [PULL V2 02/44] hw/net: Add more MII definitions, Jason Wang, 2023/03/10
- [PULL V2 03/44] fsl_etsec: Use hw/net/mii.h, Jason Wang, 2023/03/10
- [PULL V2 05/44] e1000: Mask registers when writing, Jason Wang, 2023/03/10
- [PULL V2 04/44] e1000: Use hw/net/mii.h, Jason Wang, 2023/03/10
- [PULL V2 07/44] e1000e: Mask registers when writing, Jason Wang, 2023/03/10
- [PULL V2 06/44] e1000e: Introduce E1000E_LOW_BITS_SET_FUNC, Jason Wang, 2023/03/10
- [PULL V2 08/44] e1000: Use more constant definitions, Jason Wang, 2023/03/10
- [PULL V2 09/44] e1000e: Use more constant definitions, Jason Wang, 2023/03/10
- [PULL V2 10/44] e1000: Use memcpy to intialize registers,
Jason Wang <=
- [PULL V2 11/44] e1000e: Use memcpy to intialize registers, Jason Wang, 2023/03/10
- [PULL V2 12/44] e1000e: Remove pending interrupt flags, Jason Wang, 2023/03/10
- [PULL V2 13/44] e1000e: Improve software reset, Jason Wang, 2023/03/10
- [PULL V2 14/44] e1000: Configure ResettableClass, Jason Wang, 2023/03/10
- [PULL V2 15/44] e1000e: Configure ResettableClass, Jason Wang, 2023/03/10
- [PULL V2 17/44] e1000e: Set MII_ANER_NWAY, Jason Wang, 2023/03/10
- [PULL V2 16/44] e1000e: Introduce e1000_rx_desc_union, Jason Wang, 2023/03/10
- [PULL V2 18/44] e1000e: Remove extra pointer indirection, Jason Wang, 2023/03/10
- [PULL V2 20/44] e1000x: Alter the signature of e1000x_is_vlan_packet, Jason Wang, 2023/03/10
- [PULL V2 19/44] net: Check L4 header size, Jason Wang, 2023/03/10