From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id EC2611A1E43 for ; Wed, 26 Oct 2016 18:49:07 -0700 (PDT) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP; 26 Oct 2016 18:49:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,404,1473145200"; d="scan'208";a="24528243" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga004.jf.intel.com with ESMTP; 26 Oct 2016 18:49:07 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 26 Oct 2016 18:49:05 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.209]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.2]) with mapi id 14.03.0248.002; Thu, 27 Oct 2016 09:49:03 +0800 From: "Ni, Ruiyu" To: Laszlo Ersek , edk2-devel-01 Thread-Topic: [PATCH 35/47] Nt32Pkg/WinNtSerialIoDxe: rebase to ARRAY_SIZE() Thread-Index: AQHSL7wNZNJQp/SkPUq4yUoXq1QUTKC7iQxw Date: Thu, 27 Oct 2016 01:49:03 +0000 Deferred-Delivery: Thu, 27 Oct 2016 01:49:00 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D58E42D26@SHSMSX104.ccr.corp.intel.com> References: <20161026190504.9888-1-lersek@redhat.com> <20161026190504.9888-36-lersek@redhat.com> In-Reply-To: <20161026190504.9888-36-lersek@redhat.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjMwNzhhZGEtN2E3Ni00NmM0LWE2YWUtNzFiNDc0ZWU3YTU4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX1BVQkxJQyJ9XX1dfSwiU3ViamVjdExhYmVscyI6W10sIlRNQ1ZlcnNpb24iOiIxNS45LjYuNiIsIlRydXN0ZWRMYWJlbEhhc2giOiJrYjlXaytcL3EwblVkSEFIN2Jla2dKR2ZZSWZXQ1Y2M1Q3NGVnaG9sbGVRYz0ifQ== x-ctpclassification: CTP_PUBLIC x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 35/47] Nt32Pkg/WinNtSerialIoDxe: 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 01:49:08 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ruiyu Ni Regards, Ray >-----Original Message----- >From: Laszlo Ersek [mailto:lersek@redhat.com] >Sent: Thursday, October 27, 2016 3:05 AM >To: edk2-devel-01 >Cc: Ni, Ruiyu >Subject: [PATCH 35/47] Nt32Pkg/WinNtSerialIoDxe: rebase to ARRAY_SIZE() > >Cc: Ruiyu Ni >Contributed-under: TianoCore Contribution Agreement 1.0 >Signed-off-by: Laszlo Ersek >--- > Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c b/Nt32Pkg/WinNtSeria= lIoDxe/WinNtSerialIo.c >index 0dc031393e71..23d3329d9db1 100644 >--- a/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c >+++ b/Nt32Pkg/WinNtSerialIoDxe/WinNtSerialIo.c >@@ -984,7 +984,7 @@ Returns: > //The lower baud rate supported by the serial device will be selected w= ithout exceeding the unsupported BaudRate >parameter > // > >- for (Index =3D 1; Index < (sizeof (mBaudRateCurrentSupport) / sizeof (m= BaudRateCurrentSupport[0])); Index++) { >+ for (Index =3D 1; Index < (ARRAY_SIZE (mBaudRateCurrentSupport)); Index= ++) { > if (BaudRate < mBaudRateCurrentSupport[Index]) { > BaudRate =3D mBaudRateCurrentSupport[Index-1]; > break; >-- >2.9.2 >