From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.35069.1653906073734482521 for ; Mon, 30 May 2022 03:21:14 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UUTKTpPF; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653906072; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fQJFYbGHHVlF1jDG29FPWns4FyVMZLKLqe+ssRmtH9U=; b=UUTKTpPFwxcDKQlFlcaqb/vnQPq/ubFQk4EYwURGdxXTPIHbE4eDVtNWV+wZYPBVWWvd1e Tav1+AWmpX5aEDqx8LeXkx7dBDXiOYNp5pONz+AJW3ZwujsWW+TzHgQZcYXaOLqokIRLvt 1ZMqywiPu5mf8323zbCTA7gclxwmedo= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-359-QOUFIGstPQGDkyFiLBCxhg-1; Mon, 30 May 2022 06:21:09 -0400 X-MC-Unique: QOUFIGstPQGDkyFiLBCxhg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4DF9F1C08964; Mon, 30 May 2022 10:21:09 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1C36740CF8EE; Mon, 30 May 2022 10:21:09 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B8674180039F; Mon, 30 May 2022 12:21:06 +0200 (CEST) Date: Mon, 30 May 2022 12:21:06 +0200 From: "Gerd Hoffmann" To: Ard Biesheuvel Cc: edk2-devel-groups-io , Ard Biesheuvel , Oliver Steffen , Jiewen Yao , Jordan Justen , Pawel Polawski , Rebecca Cran Subject: Re: [PATCH 1/1] OvmfPkg/VirtioGpuDxe: replace struct copy with CopyMem call Message-ID: <20220530102106.p3zh5ox5xxc66z6f@sirius.home.kraxel.org> References: <20220530092255.279983-1-kraxel@redhat.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 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); No (that's what running uncrustify would have done I guess?) thanks, Gerd