From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <hao.a.wu@intel.com>
Received: from mga09.intel.com (mga09.intel.com [134.134.136.24])
 (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 CE07121A16EC6
 for <edk2-devel@lists.01.org>; Fri, 26 May 2017 17:53:40 -0700 (PDT)
Received: from fmsmga003.fm.intel.com ([10.253.24.29])
 by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 26 May 2017 17:54:36 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.38,400,1491289200"; d="scan'208";a="861821567"
Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206])
 by FMSMGA003.fm.intel.com with ESMTP; 26 May 2017 17:54:35 -0700
Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by
 FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS)
 id 14.3.319.2; Fri, 26 May 2017 17:54:35 -0700
Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.84]) by
 SHSMSX151.ccr.corp.intel.com ([169.254.3.198]) with mapi id 14.03.0319.002;
 Sat, 27 May 2017 08:54:32 +0800
From: "Wu, Hao A" <hao.a.wu@intel.com>
To: Laszlo Ersek <lersek@redhat.com>, edk2-devel-01 <edk2-devel@lists.01.org>
CC: "Ni, Ruiyu" <ruiyu.ni@intel.com>, "Justen, Jordan L"
 <jordan.l.justen@intel.com>
Thread-Topic: [edk2] [PATCH 4/8] Nt32Pkg/FvbServicesRuntimeDxe: correct
 NumOfLba vararg type in EraseBlocks()
Thread-Index: AQHSz+g6lx/UzX2Uf0iG2V24F7l24KIHZ8EQ
Date: Sat, 27 May 2017 00:54:31 +0000
Message-ID: <B80AF82E9BFB8E4FBD8C89DA810C6A0931CAF931@SHSMSX104.ccr.corp.intel.com>
References: <20170518150427.16435-1-lersek@redhat.com>
 <20170518150427.16435-5-lersek@redhat.com>
In-Reply-To: <20170518150427.16435-5-lersek@redhat.com>
Accept-Language: zh-CN, en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [10.239.127.40]
MIME-Version: 1.0
Subject: Re: [PATCH 4/8] Nt32Pkg/FvbServicesRuntimeDxe: correct NumOfLba vararg type in EraseBlocks()
X-BeenThere: edk2-devel@lists.01.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: EDK II Development  <edk2-devel.lists.01.org>
List-Unsubscribe: <https://lists.01.org/mailman/options/edk2-devel>,
 <mailto:edk2-devel-request@lists.01.org?subject=unsubscribe>
List-Archive: <http://lists.01.org/pipermail/edk2-devel/>
List-Post: <mailto:edk2-devel@lists.01.org>
List-Help: <mailto:edk2-devel-request@lists.01.org?subject=help>
List-Subscribe: <https://lists.01.org/mailman/listinfo/edk2-devel>,
 <mailto:edk2-devel-request@lists.01.org?subject=subscribe>
X-List-Received-Date: Sat, 27 May 2017 00:53:41 -0000
Content-Language: en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Reviewed-by: Hao Wu <hao.a.wu@intel.com>


Best Regards,
Hao Wu


> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of La=
szlo
> Ersek
> Sent: Thursday, May 18, 2017 11:04 PM
> To: edk2-devel-01
> Cc: Ni, Ruiyu; Justen, Jordan L
> Subject: [edk2] [PATCH 4/8] Nt32Pkg/FvbServicesRuntimeDxe: correct
> NumOfLba vararg type in EraseBlocks()
>=20
> According to the PI spec, Volume 3,
> EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL.EraseBlocks():
>=20
> > The variable argument list is a list of tuples. Each tuple describes a
> > range of LBAs to erase and consists of the following:
> > * An EFI_LBA that indicates the starting LBA
> > * A UINTN that indicates the number of blocks to erase
>=20
> (NB, in edk2, EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL is a typedef to
> EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL.)
>=20
> In this driver, the NumOfLba local variable is defined with type UINTN,
> but the TYPE argument passed to VA_ARG() is UINT32. Fix the mismatch.
>=20
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Reported-by: Jordan Justen <jordan.l.justen@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Laszlo Ersek <lersek@redhat.com>
> ---
>=20
> Notes:
>     unbuilt, untested
>=20
>  Nt32Pkg/FvbServicesRuntimeDxe/FWBlockService.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>=20
> diff --git a/Nt32Pkg/FvbServicesRuntimeDxe/FWBlockService.c
> b/Nt32Pkg/FvbServicesRuntimeDxe/FWBlockService.c
> index 3400516f0c3c..03f1f44dafde 100644
> --- a/Nt32Pkg/FvbServicesRuntimeDxe/FWBlockService.c
> +++ b/Nt32Pkg/FvbServicesRuntimeDxe/FWBlockService.c
> @@ -945,7 +945,7 @@ Returns:
>        break;
>      }
>=20
> -    NumOfLba =3D VA_ARG (args, UINT32);
> +    NumOfLba =3D VA_ARG (args, UINTN);
>=20
>      //
>      // Check input parameters
> @@ -965,7 +965,7 @@ Returns:
>        break;
>      }
>=20
> -    NumOfLba =3D VA_ARG (args, UINT32);
> +    NumOfLba =3D VA_ARG (args, UINTN);
>=20
>      while (NumOfLba > 0) {
>        Status =3D FvbEraseBlock (FvbDevice->Instance, StartingLba,
> mFvbModuleGlobal, EfiGoneVirtual ());
> --
> 2.9.3
>=20
>=20
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel