From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 B452F1A1E43 for ; Wed, 26 Oct 2016 19:00:03 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP; 26 Oct 2016 19:00:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,404,1473145200"; d="scan'208";a="24213915" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga005.jf.intel.com with ESMTP; 26 Oct 2016 19:00:03 -0700 Received: from fmsmsx125.amr.corp.intel.com (10.18.125.40) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 26 Oct 2016 19:00:03 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX125.amr.corp.intel.com (10.18.125.40) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 26 Oct 2016 19:00:03 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.206]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.2]) with mapi id 14.03.0248.002; Thu, 27 Oct 2016 09:59:59 +0800 From: "Fu, Siyuan" To: Laszlo Ersek , edk2-devel-01 CC: "Wu, Jiaxin" Thread-Topic: [PATCH 33/47] NetworkPkg/IScsiDxe: rebase to ARRAY_SIZE() Thread-Index: AQHSL7wGO0y703ASdESV4Na0IEfNZaC7jCcg Date: Thu, 27 Oct 2016 01:59:59 +0000 Message-ID: References: <20161026190504.9888-1-lersek@redhat.com> <20161026190504.9888-34-lersek@redhat.com> In-Reply-To: <20161026190504.9888-34-lersek@redhat.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjc3N2EwNWMtNjRhOC00OThiLWI0ZjMtZDhhNzUxMTRmZDJkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Imd4Z1N4Vk1rdXdZajltMGJSeEJUOURRTFwvKytUZXF0Vk1TMElTU3VVU3ZrPSJ9 x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 33/47] NetworkPkg/IScsiDxe: 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 02:00:03 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Fu Siyuan siyuan.fu@intel.com > -----Original Message----- > From: Laszlo Ersek [mailto:lersek@redhat.com] > Sent: Thursday, October 27, 2016 3:05 AM > To: edk2-devel-01 > Cc: Wu, Jiaxin ; Fu, Siyuan > Subject: [PATCH 33/47] NetworkPkg/IScsiDxe: rebase to ARRAY_SIZE() >=20 > Cc: Jiaxin Wu > Cc: Siyuan Fu > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Laszlo Ersek > --- > NetworkPkg/IScsiDxe/IScsiConfig.c | 4 ++-- > NetworkPkg/IScsiDxe/IScsiDriver.c | 2 +- > NetworkPkg/IScsiDxe/IScsiMisc.c | 6 +++--- > 3 files changed, 6 insertions(+), 6 deletions(-) >=20 > diff --git a/NetworkPkg/IScsiDxe/IScsiConfig.c > b/NetworkPkg/IScsiDxe/IScsiConfig.c > index 3631e72e3455..16a90a6206aa 100644 > --- a/NetworkPkg/IScsiDxe/IScsiConfig.c > +++ b/NetworkPkg/IScsiDxe/IScsiConfig.c > @@ -1111,7 +1111,7 @@ IScsiConfigUpdateAttempt ( > NET_LIST_FOR_EACH (Entry, &mPrivate->AttemptConfigs) { > AttemptConfigData =3D NET_LIST_USER_STRUCT (Entry, > ISCSI_ATTEMPT_CONFIG_NVDATA, Link); >=20 > - AsciiStrToUnicodeStrS (AttemptConfigData->AttemptName, AttemptName, > sizeof (AttemptName) / sizeof (AttemptName[0])); > + AsciiStrToUnicodeStrS (AttemptConfigData->AttemptName, AttemptName, > ARRAY_SIZE (AttemptName)); > UnicodeSPrint (mPrivate->PortString, (UINTN) 128, L"Attempt %s", > AttemptName); > AttemptConfigData->AttemptTitleToken =3D HiiSetString ( > mCallbackInfo- > >RegisteredHandle, > @@ -1240,7 +1240,7 @@ IScsiConfigDeleteAttempts ( > mPrivate->SinglePathCount--; > } >=20 > - AsciiStrToUnicodeStrS (AttemptConfigData->MacString, MacString, > sizeof (MacString) / sizeof (MacString[0])); > + AsciiStrToUnicodeStrS (AttemptConfigData->MacString, MacString, > ARRAY_SIZE (MacString)); >=20 > UnicodeSPrint ( > mPrivate->PortString, > diff --git a/NetworkPkg/IScsiDxe/IScsiDriver.c > b/NetworkPkg/IScsiDxe/IScsiDriver.c > index 279f1c049679..ac10fa26d1b9 100644 > --- a/NetworkPkg/IScsiDxe/IScsiDriver.c > +++ b/NetworkPkg/IScsiDxe/IScsiDriver.c > @@ -673,7 +673,7 @@ IScsiStart ( > Session->ConfigData =3D AttemptConfigData; > Session->AuthType =3D AttemptConfigData->AuthenticationType; >=20 > - AsciiStrToUnicodeStrS (AttemptConfigData->MacString, MacString, > sizeof (MacString) / sizeof (MacString[0])); > + AsciiStrToUnicodeStrS (AttemptConfigData->MacString, MacString, > ARRAY_SIZE (MacString)); > UnicodeSPrint ( > mPrivate->PortString, > (UINTN) ISCSI_NAME_IFR_MAX_SIZE, > diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c > b/NetworkPkg/IScsiDxe/IScsiMisc.c > index 64bb2ade7b0a..11a80f2e10e4 100644 > --- a/NetworkPkg/IScsiDxe/IScsiMisc.c > +++ b/NetworkPkg/IScsiDxe/IScsiMisc.c > @@ -1109,7 +1109,7 @@ IScsiGetConfigData ( > // > // Refresh the state of this attempt to NVR. > // > - AsciiStrToUnicodeStrS (AttemptTmp->MacString, MacString, sizeo= f > (MacString) / sizeof (MacString[0])); > + AsciiStrToUnicodeStrS (AttemptTmp->MacString, MacString, > ARRAY_SIZE (MacString)); > UnicodeSPrint ( > mPrivate->PortString, > (UINTN) ISCSI_NAME_IFR_MAX_SIZE, > @@ -1148,7 +1148,7 @@ IScsiGetConfigData ( > // > // Refresh the state of this attempt to NVR. > // > - AsciiStrToUnicodeStrS (AttemptTmp->MacString, MacString, sizeof > (MacString) / sizeof (MacString[0])); > + AsciiStrToUnicodeStrS (AttemptTmp->MacString, MacString, > ARRAY_SIZE (MacString)); > UnicodeSPrint ( > mPrivate->PortString, > (UINTN) ISCSI_NAME_IFR_MAX_SIZE, > @@ -1239,7 +1239,7 @@ IScsiGetConfigData ( > // > // Refresh the state of this attempt to NVR. > // > - AsciiStrToUnicodeStrS (AttemptConfigData->MacString, MacString, > sizeof (MacString) / sizeof (MacString[0])); > + AsciiStrToUnicodeStrS (AttemptConfigData->MacString, MacString, > ARRAY_SIZE (MacString)); > UnicodeSPrint ( > mPrivate->PortString, > (UINTN) ISCSI_NAME_IFR_MAX_SIZE, > -- > 2.9.2 >=20