public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Brijesh Singh <brijesh.singh@amd.com>, edk2-devel@lists.01.org
Cc: Jordan Justen <jordan.l.justen@intel.com>
Subject: Re: [PATCH v2 1/1] OvmfPkg/QemuFwCfgLib: Suppress GCC49 IA32 build failure
Date: Wed, 12 Jul 2017 00:20:09 +0200	[thread overview]
Message-ID: <06962923-20c9-1691-3a49-481e9e8f5c4d@redhat.com> (raw)
In-Reply-To: <1499798293-22182-1-git-send-email-brijesh.singh@amd.com>

On 07/11/17 20:38, Brijesh Singh wrote:
> NumPages variable was introduced in commit 66c548be509d. In this commit
> we allocate an intermediate buffer when SEV is enabled. The 'BounceBuffer'
> variable points to the intermediate buffer pointer and NumPages variables
> stores the number of pages. Later in the code, 'BounceBuffer' variable is
> checked to see if we need to free the intermediate buffers. The code looks
> correct, suppress the warning.
> 
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Reported-by: Laszlo Ersek <lersek@redhat.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
> ---
> Changes since v1:
>  - add comments and move the local variable initialization to new line
> 
>  OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c
> index dbebd36b1853..0310d2872dae 100644
> --- a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c
> +++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c
> @@ -83,6 +83,11 @@ InternalQemuFwCfgDmaBytes (
>    }
>  
>    //
> +  // set NumPages to suppress incorrect compiler/analyzer warnigns
> +  //
> +  NumPages = 0;
> +
> +  //
>    // When SEV is enabled then allocate DMA bounce buffer
>    //
>    if (InternalQemuFwCfgSevIsEnabled ()) {
> 

Reported-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
[lersek@redhat.com: s/warnigns/warnings/ in the code comment]
[lersek@redhat.com: add Gerd's Reported-by]
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

Pushed as commit e508e069a809.

I also fixed up the typo in
<https://bugzilla.tianocore.org/show_bug.cgi?id=607#c3>.

Thanks!
Laszlo


      reply	other threads:[~2017-07-11 22:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-11 18:38 [PATCH v2 1/1] OvmfPkg/QemuFwCfgLib: Suppress GCC49 IA32 build failure Brijesh Singh
2017-07-11 22:20 ` Laszlo Ersek [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=06962923-20c9-1691-3a49-481e9e8f5c4d@redhat.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