From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 9C7F721C8F620 for ; Tue, 11 Jul 2017 15:18:25 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 657034E4CA; Tue, 11 Jul 2017 22:20:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 657034E4CA Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=lersek@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 657034E4CA Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-201.phx2.redhat.com [10.3.116.201]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9BD15600C6; Tue, 11 Jul 2017 22:20:10 +0000 (UTC) To: Brijesh Singh , edk2-devel@lists.01.org Cc: Jordan Justen References: <1499798293-22182-1-git-send-email-brijesh.singh@amd.com> From: Laszlo Ersek Message-ID: <06962923-20c9-1691-3a49-481e9e8f5c4d@redhat.com> Date: Wed, 12 Jul 2017 00:20:09 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1499798293-22182-1-git-send-email-brijesh.singh@amd.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 11 Jul 2017 22:20:11 +0000 (UTC) Subject: Re: [PATCH v2 1/1] OvmfPkg/QemuFwCfgLib: Suppress GCC49 IA32 build failure X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jul 2017 22:18:25 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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 > Cc: Laszlo Ersek > Reported-by: Laszlo Ersek > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Brijesh Singh > --- > 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 Reviewed-by: Laszlo Ersek [lersek@redhat.com: s/warnigns/warnings/ in the code comment] [lersek@redhat.com: add Gerd's Reported-by] Signed-off-by: Laszlo Ersek Pushed as commit e508e069a809. I also fixed up the typo in . Thanks! Laszlo