* [PATCH 1/1] OvmfPkg/VirtioGpuDxe: replace struct copy with CopyMem call
@ 2022-05-30 9:22 Gerd Hoffmann
2022-05-30 9:32 ` Ard Biesheuvel
0 siblings, 1 reply; 4+ messages in thread
From: Gerd Hoffmann @ 2022-05-30 9:22 UTC (permalink / raw)
To: devel
Cc: Ard Biesheuvel, Oliver Steffen, Gerd Hoffmann, Jiewen Yao,
Jordan Justen, Pawel Polawski, Rebecca Cran
Buildfix for `-t CLANG38 -b NOOPT -p OvmfPkg/OvmfPkgX64.dsc`.
Fixes: 5f6ecaa398ba ("OvmfPkg/VirtioGpuDxe: use GopQueryMode in GopSetMode")
Reported-by: Rebecca Cran <quic_rcran@quicinc.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
OvmfPkg/VirtioGpuDxe/Gop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/OvmfPkg/VirtioGpuDxe/Gop.c b/OvmfPkg/VirtioGpuDxe/Gop.c
index 70a81c10c8b5..18b29e5a23d2 100644
--- a/OvmfPkg/VirtioGpuDxe/Gop.c
+++ b/OvmfPkg/VirtioGpuDxe/Gop.c
@@ -509,7 +509,7 @@ GopSetMode (
// Populate Mode and ModeInfo (mutable fields only).
//
VgpuGop->GopMode.Mode = ModeNumber;
- VgpuGop->GopModeInfo = *GopModeInfo;
+ CopyMem(&VgpuGop->GopModeInfo, GopModeInfo, sizeof(*GopModeInfo));
FreePool (GopModeInfo);
return EFI_SUCCESS;
--
2.35.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] OvmfPkg/VirtioGpuDxe: replace struct copy with CopyMem call
2022-05-30 9:22 [PATCH 1/1] OvmfPkg/VirtioGpuDxe: replace struct copy with CopyMem call Gerd Hoffmann
@ 2022-05-30 9:32 ` Ard Biesheuvel
2022-05-30 10:21 ` Gerd Hoffmann
0 siblings, 1 reply; 4+ messages in thread
From: Ard Biesheuvel @ 2022-05-30 9:32 UTC (permalink / raw)
To: Gerd Hoffmann
Cc: edk2-devel-groups-io, Ard Biesheuvel, Oliver Steffen, Jiewen Yao,
Jordan Justen, Pawel Polawski, Rebecca Cran
Hi Gerd,
On Mon, 30 May 2022 at 11:23, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> Buildfix for `-t CLANG38 -b NOOPT -p OvmfPkg/OvmfPkgX64.dsc`.
>
> Fixes: 5f6ecaa398ba ("OvmfPkg/VirtioGpuDxe: use GopQueryMode in GopSetMode")
> Reported-by: Rebecca Cran <quic_rcran@quicinc.com>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> OvmfPkg/VirtioGpuDxe/Gop.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/OvmfPkg/VirtioGpuDxe/Gop.c b/OvmfPkg/VirtioGpuDxe/Gop.c
> index 70a81c10c8b5..18b29e5a23d2 100644
> --- a/OvmfPkg/VirtioGpuDxe/Gop.c
> +++ b/OvmfPkg/VirtioGpuDxe/Gop.c
> @@ -509,7 +509,7 @@ GopSetMode (
> // Populate Mode and ModeInfo (mutable fields only).
> //
> VgpuGop->GopMode.Mode = ModeNumber;
> - VgpuGop->GopModeInfo = *GopModeInfo;
> + CopyMem(&VgpuGop->GopModeInfo, GopModeInfo, sizeof(*GopModeInfo));
Mind if I change this to
CopyMem (&VgpuGop->GopModeInfo, GopModeInfo, sizeof VgpuGop->GopModeInfo);
?
> FreePool (GopModeInfo);
> return EFI_SUCCESS;
>
> --
> 2.35.3
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] OvmfPkg/VirtioGpuDxe: replace struct copy with CopyMem call
2022-05-30 9:32 ` Ard Biesheuvel
@ 2022-05-30 10:21 ` Gerd Hoffmann
2022-05-30 11:08 ` Ard Biesheuvel
0 siblings, 1 reply; 4+ messages in thread
From: Gerd Hoffmann @ 2022-05-30 10:21 UTC (permalink / raw)
To: Ard Biesheuvel
Cc: edk2-devel-groups-io, Ard Biesheuvel, Oliver Steffen, Jiewen Yao,
Jordan Justen, Pawel Polawski, Rebecca Cran
On Mon, May 30, 2022 at 11:32:03AM +0200, Ard Biesheuvel wrote:
> Hi Gerd,
>
> On Mon, 30 May 2022 at 11:23, Gerd Hoffmann <kraxel@redhat.com> wrote:
> >
> > Buildfix for `-t CLANG38 -b NOOPT -p OvmfPkg/OvmfPkgX64.dsc`.
> >
> > Fixes: 5f6ecaa398ba ("OvmfPkg/VirtioGpuDxe: use GopQueryMode in GopSetMode")
> > Reported-by: Rebecca Cran <quic_rcran@quicinc.com>
> > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> > ---
> > OvmfPkg/VirtioGpuDxe/Gop.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/OvmfPkg/VirtioGpuDxe/Gop.c b/OvmfPkg/VirtioGpuDxe/Gop.c
> > index 70a81c10c8b5..18b29e5a23d2 100644
> > --- a/OvmfPkg/VirtioGpuDxe/Gop.c
> > +++ b/OvmfPkg/VirtioGpuDxe/Gop.c
> > @@ -509,7 +509,7 @@ GopSetMode (
> > // Populate Mode and ModeInfo (mutable fields only).
> > //
> > VgpuGop->GopMode.Mode = ModeNumber;
> > - VgpuGop->GopModeInfo = *GopModeInfo;
> > + CopyMem(&VgpuGop->GopModeInfo, GopModeInfo, sizeof(*GopModeInfo));
>
> Mind if I change this to
>
> CopyMem (&VgpuGop->GopModeInfo, GopModeInfo, sizeof VgpuGop->GopModeInfo);
No (that's what running uncrustify would have done I guess?)
thanks,
Gerd
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] OvmfPkg/VirtioGpuDxe: replace struct copy with CopyMem call
2022-05-30 10:21 ` Gerd Hoffmann
@ 2022-05-30 11:08 ` Ard Biesheuvel
0 siblings, 0 replies; 4+ messages in thread
From: Ard Biesheuvel @ 2022-05-30 11:08 UTC (permalink / raw)
To: Gerd Hoffmann
Cc: edk2-devel-groups-io, Ard Biesheuvel, Oliver Steffen, Jiewen Yao,
Jordan Justen, Pawel Polawski, Rebecca Cran
On Mon, 30 May 2022 at 12:21, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> On Mon, May 30, 2022 at 11:32:03AM +0200, Ard Biesheuvel wrote:
> > Hi Gerd,
> >
> > On Mon, 30 May 2022 at 11:23, Gerd Hoffmann <kraxel@redhat.com> wrote:
> > >
> > > Buildfix for `-t CLANG38 -b NOOPT -p OvmfPkg/OvmfPkgX64.dsc`.
> > >
> > > Fixes: 5f6ecaa398ba ("OvmfPkg/VirtioGpuDxe: use GopQueryMode in GopSetMode")
> > > Reported-by: Rebecca Cran <quic_rcran@quicinc.com>
> > > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> > > ---
> > > OvmfPkg/VirtioGpuDxe/Gop.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/OvmfPkg/VirtioGpuDxe/Gop.c b/OvmfPkg/VirtioGpuDxe/Gop.c
> > > index 70a81c10c8b5..18b29e5a23d2 100644
> > > --- a/OvmfPkg/VirtioGpuDxe/Gop.c
> > > +++ b/OvmfPkg/VirtioGpuDxe/Gop.c
> > > @@ -509,7 +509,7 @@ GopSetMode (
> > > // Populate Mode and ModeInfo (mutable fields only).
> > > //
> > > VgpuGop->GopMode.Mode = ModeNumber;
> > > - VgpuGop->GopModeInfo = *GopModeInfo;
> > > + CopyMem(&VgpuGop->GopModeInfo, GopModeInfo, sizeof(*GopModeInfo));
> >
> > Mind if I change this to
> >
> > CopyMem (&VgpuGop->GopModeInfo, GopModeInfo, sizeof VgpuGop->GopModeInfo);
>
> No (that's what running uncrustify would have done I guess?)
>
Not sure - I don't know how to run that. But the missing space before
( caught my eye
Merged as #2925
Thanks,
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-05-30 11:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-30 9:22 [PATCH 1/1] OvmfPkg/VirtioGpuDxe: replace struct copy with CopyMem call Gerd Hoffmann
2022-05-30 9:32 ` Ard Biesheuvel
2022-05-30 10:21 ` Gerd Hoffmann
2022-05-30 11:08 ` Ard Biesheuvel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox