From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id AF8A41A1E57 for ; Thu, 27 Oct 2016 00:12:30 -0700 (PDT) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 27 Oct 2016 00:12:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,404,1473145200"; d="scan'208";a="1059886775" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga001.fm.intel.com with ESMTP; 27 Oct 2016 00:12:30 -0700 Received: from fmsmsx126.amr.corp.intel.com (10.18.125.43) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 27 Oct 2016 00:12:29 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX126.amr.corp.intel.com (10.18.125.43) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 27 Oct 2016 00:12:29 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.139]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.2]) with mapi id 14.03.0248.002; Thu, 27 Oct 2016 15:12:27 +0800 From: "Guo, Mang" To: Laszlo Ersek , edk2-devel-01 CC: Tim He , "Wei, David" Thread-Topic: [edk2] [PATCH 45/47] Vlv2TbltDevicePkg/PlatformPei: rebase to ARRAY_SIZE() Thread-Index: AQHSL7xPslekaC9Z+EK/cz2sIn4Q2KC7422g Date: Thu, 27 Oct 2016 07:12:26 +0000 Message-ID: <22D2C85ED001C54AA20BFE3B0E4751D14FAD7C25@SHSMSX103.ccr.corp.intel.com> References: <20161026190504.9888-1-lersek@redhat.com> <20161026190504.9888-46-lersek@redhat.com> In-Reply-To: <20161026190504.9888-46-lersek@redhat.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 45/47] Vlv2TbltDevicePkg/PlatformPei: rebase to ARRAY_SIZE() X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2016 07:12:30 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Guo, Mang . -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Lasz= lo Ersek Sent: Thursday, October 27, 2016 3:05 AM To: edk2-devel-01 Cc: Tim He; Wei, David Subject: [edk2] [PATCH 45/47] Vlv2TbltDevicePkg/PlatformPei: rebase to ARRA= Y_SIZE() Cc: David Wei Cc: Tim He Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- Vlv2TbltDevicePkg/PlatformPei/BootMode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Vlv2TbltDevicePkg/PlatformPei/BootMode.c b/Vlv2TbltDevicePkg/P= latformPei/BootMode.c index 4d933a09db0e..95be1c0f2851 100644 --- a/Vlv2TbltDevicePkg/PlatformPei/BootMode.c +++ b/Vlv2TbltDevicePkg/PlatformPei/BootMode.c @@ -372,13 +372,13 @@ PrioritizeBootMode ( // Find the position of the current boot mode in our priority array // for ( CurrentIndex =3D 0; - CurrentIndex < sizeof (mBootModePriority) / sizeof (mBootModePrior= ity[0]); + CurrentIndex < ARRAY_SIZE (mBootModePriority); CurrentIndex++) { if (mBootModePriority[CurrentIndex] =3D=3D *CurrentBootMode) { break; } } - if (CurrentIndex >=3D sizeof (mBootModePriority) / sizeof (mBootModePrio= rity[0])) { + if (CurrentIndex >=3D ARRAY_SIZE (mBootModePriority)) { return EFI_NOT_FOUND; } =20 @@ -386,7 +386,7 @@ PrioritizeBootMode ( // Find the position of the new boot mode in our priority array // for ( NewIndex =3D 0; - NewIndex < sizeof (mBootModePriority) / sizeof (mBootModePriority[= 0]); + NewIndex < ARRAY_SIZE (mBootModePriority); NewIndex++) { if (mBootModePriority[NewIndex] =3D=3D NewBootMode) { // --=20 2.9.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel