From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by mx.groups.io with SMTP id smtpd.web11.34898.1653903140176396431 for ; Mon, 30 May 2022 02:32:20 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=A5C48KNx; spf=pass (domain: kernel.org, ip: 145.40.73.55, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 085FACE0EA9 for ; Mon, 30 May 2022 09:32:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D061C36AE7 for ; Mon, 30 May 2022 09:32:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653903135; bh=TjFJUapSOH+NL0AMxrI5dpCQyazSDRkDLXaRsh05VFs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=A5C48KNxulGP3VmseYl5opNok/0eZM3EZsS4iQj1OPcjgqkioldctisfqFC8CXkUJ Bl/j9o+GB7JWO7lM9zNWGOpanbhEc+OZFW1KX3c0d45nl/PyOlIBXdTbIlHrAATVvs 1FJv/Fk236qv8IHTTFajzl2m/rgJs4zSVqIcpmWaNJEvPWo51YZYUoRkXL1/2MGqVQ o2lVcsd9VHAwCNHHvt1neykDkcvNTOhJM+/wpw8YfKL8DdDvM8kEKphQRM89Oeu2xO /Wb3UHSTivDg+Hn27KHN3qQ7iz/NIsHOmh0nMQlHha3hxMxDfTARRSgDR3wpZSpUAq 5aVj/pRslefdA== Received: by mail-oi1-f173.google.com with SMTP id y131so5889750oia.6 for ; Mon, 30 May 2022 02:32:15 -0700 (PDT) X-Gm-Message-State: AOAM532XrFikPJoXbClWFZ0JLo909tdSCsGwJ4gez6ok3ipWJWrPIIvc HbXqOyiIUWFyy97mZ8mV8y8jrHyZ9EnlweBZpWI= X-Google-Smtp-Source: ABdhPJwfJ2Vv3oVXmKx+gmuDGd0aLeSx702o22RLS6GBi20BxcmF0puRI6sLFAY34cxK436qn1yKTe1QPQTbzHOsmwk= X-Received: by 2002:a05:6808:300e:b0:32c:425e:df34 with SMTP id ay14-20020a056808300e00b0032c425edf34mr42615oib.126.1653903134634; Mon, 30 May 2022 02:32:14 -0700 (PDT) MIME-Version: 1.0 References: <20220530092255.279983-1-kraxel@redhat.com> In-Reply-To: <20220530092255.279983-1-kraxel@redhat.com> From: "Ard Biesheuvel" Date: Mon, 30 May 2022 11:32:03 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/1] OvmfPkg/VirtioGpuDxe: replace struct copy with CopyMem call To: Gerd Hoffmann Cc: edk2-devel-groups-io , Ard Biesheuvel , Oliver Steffen , Jiewen Yao , Jordan Justen , Pawel Polawski , Rebecca Cran Content-Type: text/plain; charset="UTF-8" Hi Gerd, On Mon, 30 May 2022 at 11:23, Gerd Hoffmann wrote: > > Buildfix for `-t CLANG38 -b NOOPT -p OvmfPkg/OvmfPkgX64.dsc`. > > Fixes: 5f6ecaa398ba ("OvmfPkg/VirtioGpuDxe: use GopQueryMode in GopSetMode") > Reported-by: Rebecca Cran > Signed-off-by: Gerd Hoffmann > --- > 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 >