From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 570B421A16EC6 for ; Fri, 26 May 2017 17:53:46 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 May 2017 17:54:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,400,1491289200"; d="scan'208";a="92392502" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga002.jf.intel.com with ESMTP; 26 May 2017 17:54:40 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 26 May 2017 17:54:40 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.319.2; Fri, 26 May 2017 17:54:40 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.84]) by shsmsx102.ccr.corp.intel.com ([169.254.2.146]) with mapi id 14.03.0319.002; Sat, 27 May 2017 08:54:20 +0800 From: "Wu, Hao A" To: Laszlo Ersek , edk2-devel-01 CC: "Ni, Ruiyu" , "Justen, Jordan L" Thread-Topic: [edk2] [PATCH 2/8] DuetPkg/FvbRuntimeService: correct NumOfLba vararg type in EraseBlocks() Thread-Index: AQHSz+gdZw13cq2uL0WuM8VVyBhG3aIHZybg Date: Sat, 27 May 2017 00:54:20 +0000 Message-ID: References: <20170518150427.16435-1-lersek@redhat.com> <20170518150427.16435-3-lersek@redhat.com> In-Reply-To: <20170518150427.16435-3-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 2/8] DuetPkg/FvbRuntimeService: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 May 2017 00:53:46 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Hao Wu 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 2/8] DuetPkg/FvbRuntimeService: 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 > Cc: Ruiyu Ni > Reported-by: Jordan Justen > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Laszlo Ersek > --- >=20 > Notes: > unbuilt, untested >=20 > DuetPkg/FvbRuntimeService/FWBlockService.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/DuetPkg/FvbRuntimeService/FWBlockService.c > b/DuetPkg/FvbRuntimeService/FWBlockService.c > index e0ddbd53121b..bc663273d4ce 100644 > --- a/DuetPkg/FvbRuntimeService/FWBlockService.c > +++ b/DuetPkg/FvbRuntimeService/FWBlockService.c > @@ -991,7 +991,7 @@ Returns: > break; > } >=20 > - NumOfLba =3D VA_ARG (args, UINT32); > + NumOfLba =3D VA_ARG (args, UINTN); >=20 > // > // Check input parameters > @@ -1011,7 +1011,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