Removed unnecessary SetMem(). Replaced CopyMem() with direct copy of structure members.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Daniil Egranov daniil.egranov@arm.com --- Drivers/Net/MarvellYukonDxe/if_msk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Drivers/Net/MarvellYukonDxe/if_msk.c b/Drivers/Net/MarvellYukonDxe/if_msk.c index 6fb8af4..d23f893 100644 --- a/Drivers/Net/MarvellYukonDxe/if_msk.c +++ b/Drivers/Net/MarvellYukonDxe/if_msk.c @@ -615,7 +615,6 @@ msk_newbuf ( rxd = &sc_if->msk_cdata.msk_rxdesc[idx]; #endif
- gBS->SetMem (&(rxd->rx_m), sizeof (MSK_DMA_BUF), 0); rxd->rx_m.DmaMapping = Mapping; rxd->rx_m.Buf = Buffer; rxd->rx_m.Length = Length; @@ -1906,7 +1905,9 @@ msk_rxeof ( rxd = &sc_if->msk_cdata.msk_rxdesc[cons]; #endif
- gBS->CopyMem (&m, &rxd->rx_m, sizeof(m)); + m.Buf = rxd->rx_m.Buf; + m.DmaMapping = rxd->rx_m.DmaMapping; + m.Length = rxd->rx_m.Length;
Status = msk_newbuf (sc_if, cons); if (EFI_ERROR (Status)) {