[edk2-devel] [PATCH v2 3/3] MdeModulePkg: Use CopyMem instead of GUID assignment

Wang, Jian J jian.j.wang at intel.com
Thu Mar 12 05:58:05 UTC 2020


Pushed @ 64a228f5f89320fd632bb6c55e154961f2410680

Regards,
Jian

> -----Original Message-----
> From: devel at edk2.groups.io <devel at edk2.groups.io> On Behalf Of Dandan Bi
> Sent: Thursday, March 05, 2020 8:40 AM
> To: Daniel Schaefer <daniel.schaefer at hpe.com>; devel at edk2.groups.io
> Cc: Abner Chang <abner.chang at hpe.com>; Gilbert Chen
> <gilbert.chen at hpe.com>; Leif Lindholm <leif at nuviainc.com>; Dong, Eric
> <eric.dong at intel.com>
> Subject: Re: [edk2-devel] [PATCH v2 3/3] MdeModulePkg: Use CopyMem
> instead of GUID assignment
> 
> Reviewed-by: Dandan Bi <dandan.bi at intel.com>
> 
> 
> Thanks,
> Dandan
> > -----Original Message-----
> > From: Daniel Schaefer [mailto:daniel.schaefer at hpe.com]
> > Sent: Monday, March 2, 2020 6:33 PM
> > To: devel at edk2.groups.io
> > Cc: Abner Chang <abner.chang at hpe.com>; Gilbert Chen
> > <gilbert.chen at hpe.com>; Leif Lindholm <leif at nuviainc.com>; Bi, Dandan
> > <dandan.bi at intel.com>; Dong, Eric <eric.dong at intel.com>
> > Subject: [PATCH v2 3/3] MdeModulePkg: Use CopyMem instead of GUID
> > assignment
> >
> > GCC translates a simple assignment to memcpy, which EDKII doesn't provide.
> > See: https://www.mail-archive.com/edk2-devel@lists.01.org/msg11928.html
> >
> > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2547
> >
> > Signed-off-by: Daniel Schaefer <daniel.schaefer at hpe.com>
> > Cc: Abner Chang <abner.chang at hpe.com>
> > Cc: Gilbert Chen <gilbert.chen at hpe.com>
> > Cc: Leif Lindholm <leif at nuviainc.com>
> > Cc: Dandan Bi <dandan.bi at intel.com>
> > Cc: Eric Dong <eric.dong at intel.com>
> > ---
> >
> > Notes:
> >     v2:
> >       - Use CopyMem instead of CopyGuid [Dandan]
> >
> >  MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c
> > b/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c
> > index 5cc527679a78..0540e6fa8a44 100644
> > --- a/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c
> > +++ b/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c
> > @@ -619,7 +619,7 @@ CreateDeviceManagerForm(
> >          TokenHelp = HiiSetString (HiiHandle, 0, String, NULL);
> >
> >          FreePool (String);
> >
> >
> >
> > -        FormSetGuid = ((EFI_IFR_FORM_SET *)Ptr)->Guid;
> >
> > +        CopyMem (&FormSetGuid, &((EFI_IFR_FORM_SET *) Ptr)->Guid, sizeof
> > (EFI_GUID));
> >
> >
> >
> >          //
> >
> >          // Network device process
> >
> > --
> > 2.25.0
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#55790): https://edk2.groups.io/g/devel/message/55790
Mute This Topic: https://groups.io/mt/71671270/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list