public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Bi, Dandan" <dandan.bi@intel.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: "edk2-devel@ml01.01.org" <edk2-devel@ml01.01.org>,
	"Justen, Jordan L" <jordan.l.justen@intel.com>,
	"Gao, Liming" <liming.gao@intel.com>
Subject: Re: [patch] OvmfPkg: Fix VS toolchain build failure
Date: Thu, 22 Sep 2016 01:10:12 +0000	[thread overview]
Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB3961DC6B@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <6ed6d6fe-05bb-82dc-0ea5-c6aeeb83159d@redhat.com>

Ok!  Thank you for your comments! I will send patch with V2 for review. 

Thanks,
Dandan

-----Original Message-----
From: Laszlo Ersek [mailto:lersek@redhat.com] 
Sent: Thursday, September 22, 2016 9:07 AM
To: Bi, Dandan <dandan.bi@intel.com>
Cc: edk2-devel@ml01.01.org; Justen, Jordan L <jordan.l.justen@intel.com>; Gao, Liming <liming.gao@intel.com>
Subject: Re: [patch] OvmfPkg: Fix VS toolchain build failure

On 09/22/16 02:54, Dandan Bi wrote:
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Liming Gao <liming.gao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  OvmfPkg/VirtioGpuDxe/Commands.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/OvmfPkg/VirtioGpuDxe/Commands.c 
> b/OvmfPkg/VirtioGpuDxe/Commands.c index b369dc3..53a94ac 100644
> --- a/OvmfPkg/VirtioGpuDxe/Commands.c
> +++ b/OvmfPkg/VirtioGpuDxe/Commands.c
> @@ -287,11 +287,11 @@ VirtioGpuSendCommand (
>  
>    //
>    // Compose the descriptor chain.
>    //
>    VirtioPrepare (&VgpuDev->Ring, &Indices);
> -  VirtioAppendDesc (&VgpuDev->Ring, (UINTN)Header, RequestSize,
> +  VirtioAppendDesc (&VgpuDev->Ring, (UINTN)Header, 
> + (UINT32)RequestSize,
>      VRING_DESC_F_NEXT, &Indices);
>    VirtioAppendDesc (&VgpuDev->Ring, (UINTN)&Response, sizeof Response,
>      VRING_DESC_F_WRITE, &Indices);
>  
>    //
> 

The patch is good, but I'd like to see another change: in the function, you see

  ASSERT (RequestSize >= sizeof *Header);

a little bit higher up.

Right under that, please add:

  ASSERT (RequestSize <= MAX_UINT32);

And then the cast is fine.

Can you please send v2 with this addition?

Thank you for addressing this compiler warning (and sorry about the inconvenience with the VS build).

Laszlo


      reply	other threads:[~2016-09-22  1:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-22  0:54 [patch] OvmfPkg: Fix VS toolchain build failure Dandan Bi
2016-09-22  1:06 ` Laszlo Ersek
2016-09-22  1:10   ` Bi, Dandan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3C0D5C461C9E904E8F62152F6274C0BB3961DC6B@shsmsx102.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox