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 with cipher CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4B8271A1E86 for ; Wed, 26 Oct 2016 18:47:35 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP; 26 Oct 2016 18:47:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,404,1473145200"; d="scan'208";a="24162534" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga005.fm.intel.com with ESMTP; 26 Oct 2016 18:47:34 -0700 Received: from fmsmsx125.amr.corp.intel.com (10.18.125.40) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 26 Oct 2016 18:47:34 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX125.amr.corp.intel.com (10.18.125.40) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 26 Oct 2016 18:47:34 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.209]) by shsmsx102.ccr.corp.intel.com ([169.254.2.206]) with mapi id 14.03.0248.002; Thu, 27 Oct 2016 09:47:06 +0800 From: "Ni, Ruiyu" To: Laszlo Ersek , edk2-devel-01 CC: "Carsey, Jaben" Thread-Topic: [PATCH 41/47] ShellPkg/UefiDpLib: rebase to ARRAY_SIZE() Thread-Index: AQHSL7wUEiBrmq/hYkq0T8ldjUNqVaC7iIvg Date: Thu, 27 Oct 2016 01:47:06 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D58E42CAC@SHSMSX104.ccr.corp.intel.com> References: <20161026190504.9888-1-lersek@redhat.com> <20161026190504.9888-42-lersek@redhat.com> In-Reply-To: <20161026190504.9888-42-lersek@redhat.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzA3NGVhN2UtY2Y3YS00ZmMzLWI1NWItMGJhNWZiNmYzYWE3IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX1BVQkxJQyJ9XX1dfSwiU3ViamVjdExhYmVscyI6W10sIlRNQ1ZlcnNpb24iOiIxNS45LjYuNiIsIlRydXN0ZWRMYWJlbEhhc2giOiJnQWVBeXQ0UVhoR3BUS1BPekZJMmpuaXdzbjBBSGhtVGdiZGZNYkQxY0FVPSJ9 x-ctpclassification: CTP_PUBLIC x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 41/47] ShellPkg/UefiDpLib: 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:47:35 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ruiyu Ni >-----Original Message----- >From: Laszlo Ersek [mailto:lersek@redhat.com] >Sent: Thursday, October 27, 2016 3:05 AM >To: edk2-devel-01 >Cc: Carsey, Jaben ; Ni, Ruiyu >Subject: [PATCH 41/47] ShellPkg/UefiDpLib: rebase to ARRAY_SIZE() > >Cc: Jaben Carsey >Cc: Ruiyu Ni >Contributed-under: TianoCore Contribution Agreement 1.0 >Signed-off-by: Laszlo Ersek >--- > ShellPkg/Library/UefiDpLib/DpTrace.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > >diff --git a/ShellPkg/Library/UefiDpLib/DpTrace.c b/ShellPkg/Library/UefiD= pLib/DpTrace.c >index f3f781fdb989..eca2ef309bbc 100644 >--- a/ShellPkg/Library/UefiDpLib/DpTrace.c >+++ b/ShellPkg/Library/UefiDpLib/DpTrace.c >@@ -220,8 +220,8 @@ DumpAllTrace( > ++Count; // Count the number of records printed > > // If Handle is non-zero, see if we can determine a name for the dr= iver >- AsciiStrToUnicodeStrS (Measurement.Module, mGaugeString, sizeof (mG= augeString) / sizeof (mGaugeString[0])); // >Use Module by default >- AsciiStrToUnicodeStrS (Measurement.Token, mUnicodeToken, sizeof (mU= nicodeToken) / sizeof (mUnicodeToken[0])); >+ AsciiStrToUnicodeStrS (Measurement.Module, mGaugeString, ARRAY_SIZE= (mGaugeString)); // Use Module by >default >+ AsciiStrToUnicodeStrS (Measurement.Token, mUnicodeToken, ARRAY_SIZE= (mUnicodeToken)); > if (Measurement.Handle !=3D NULL) { > // See if the Handle is in the HandleBuffer > for (TIndex =3D 0; TIndex < HandleCount; TIndex++) { >@@ -595,7 +595,7 @@ ProcessHandles( > continue; > } > mGaugeString[0] =3D 0; // Empty driver name by default >- AsciiStrToUnicodeStrS (Measurement.Token, mUnicodeToken, sizeof (mU= nicodeToken) / sizeof (mUnicodeToken[0])); >+ AsciiStrToUnicodeStrS (Measurement.Token, mUnicodeToken, ARRAY_SIZE= (mUnicodeToken)); > // See if the Handle is in the HandleBuffer > for (Index =3D 0; Index < HandleCount; Index++) { > if (Measurement.Handle =3D=3D HandleBuffer[Index]) { >@@ -776,8 +776,8 @@ ProcessGlobal( > &Measurement.EndTimeStamp, > &Measurement.Identifier)) !=3D 0) > { >- AsciiStrToUnicodeStrS (Measurement.Module, mGaugeString, sizeof (mGau= geString) / sizeof (mGaugeString[0])); >- AsciiStrToUnicodeStrS (Measurement.Token, mUnicodeToken, sizeof (mUni= codeToken) / sizeof (mUnicodeToken[0])); >+ AsciiStrToUnicodeStrS (Measurement.Module, mGaugeString, ARRAY_SIZE (= mGaugeString)); >+ AsciiStrToUnicodeStrS (Measurement.Token, mUnicodeToken, ARRAY_SIZE (= mUnicodeToken)); > mGaugeString[25] =3D 0; > mUnicodeToken[31] =3D 0; > if ( ! ( IsPhase( &Measurement) || >-- >2.9.2 >