From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 CFD26211C2808 for ; Wed, 30 Jan 2019 08:13:42 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jan 2019 08:13:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,541,1539673200"; d="scan'208";a="134463177" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga001.jf.intel.com with ESMTP; 30 Jan 2019 08:13:36 -0800 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 30 Jan 2019 08:13:36 -0800 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.205]) by FMSMSX112.amr.corp.intel.com ([169.254.5.61]) with mapi id 14.03.0415.000; Wed, 30 Jan 2019 08:13:35 -0800 From: "Carsey, Jaben" To: "Zhang, Shenglei" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH v5 7/7] ShellPkg/UefiShellLib: Use BaseLib api CharToUpper Thread-Index: AQHUuGXeXjjRZ7s/kUer6e6hzwhsfaXH/LEQ Date: Wed, 30 Jan 2019 16:13:35 +0000 Message-ID: References: <20190130063417.11308-1-shenglei.zhang@intel.com> <20190130063417.11308-8-shenglei.zhang@intel.com> In-Reply-To: <20190130063417.11308-8-shenglei.zhang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMmQ0ZjgwNTEtYTRhMC00YjUzLWExZGYtNmU0OGNhMWZiNTgwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiWWVxQ1lIQks3Z1wvRHJxVHNvTmdIRHFUWTRvaFlXd2xieGliSnFvWE9ramk5c1c0ekplNU1taTJNMDMwRWd0VmMifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.1.200.107] MIME-Version: 1.0 Subject: Re: [PATCH v5 7/7] ShellPkg/UefiShellLib: Use BaseLib api CharToUpper X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jan 2019 16:13:43 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:13:43 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:13:43 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:13:43 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:13:43 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:13:43 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:13:43 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:13:43 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:13:43 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:13:43 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:13:43 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:13:43 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:13:43 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:13:43 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:13:43 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:13:43 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:13:43 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:13:43 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:13:43 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:13:43 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:13:43 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:13:43 -0000 X-List-Received-Date: Wed, 30 Jan 2019 16:13:43 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jaben Carsey > -----Original Message----- > From: Zhang, Shenglei > Sent: Tuesday, January 29, 2019 10:34 PM > To: edk2-devel@lists.01.org > Cc: Ni, Ray ; Carsey, Jaben > Subject: [PATCH v5 7/7] ShellPkg/UefiShellLib: Use BaseLib api CharToUppe= r > Importance: High >=20 > Substitute InternalShellCharToUpper with CharToUpper which is a public > function with the same effect. > Remove the implement of InternalShellCharToUpper. > https://bugzilla.tianocore.org/show_bug.cgi?id=3D1369 >=20 > Cc: Ruiyu Ni > Cc: Jaben Carsey > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Shenglei Zhang > Reviewed-by: Jaben Carsey > Reviewed-by: Liming Gao > --- > ShellPkg/Library/UefiShellLib/UefiShellLib.c | 31 ++------------------ > 1 file changed, 2 insertions(+), 29 deletions(-) >=20 > diff --git a/ShellPkg/Library/UefiShellLib/UefiShellLib.c > b/ShellPkg/Library/UefiShellLib/UefiShellLib.c > index b17266d623..aff933dcdf 100644 > --- a/ShellPkg/Library/UefiShellLib/UefiShellLib.c > +++ b/ShellPkg/Library/UefiShellLib/UefiShellLib.c > @@ -3740,33 +3740,6 @@ ShellFileExists( > return (EFI_SUCCESS); > } >=20 > -/** > - Convert a Unicode character to upper case only if > - it maps to a valid small-case ASCII character. > - > - This internal function only deal with Unicode character > - which maps to a valid small-case ASCII character, i.e. > - L'a' to L'z'. For other Unicode character, the input character > - is returned directly. > - > - @param Char The character to convert. > - > - @retval LowerCharacter If the Char is with range L'a' to L'z'. > - @retval Unchanged Otherwise. > - > -**/ > -CHAR16 > -InternalShellCharToUpper ( > - IN CHAR16 Char > - ) > -{ > - if (Char >=3D L'a' && Char <=3D L'z') { > - return (CHAR16) (Char - (L'a' - L'A')); > - } > - > - return Char; > -} > - > /** > Convert a Unicode character to numerical value. >=20 > @@ -3789,7 +3762,7 @@ InternalShellHexCharToUintn ( > return Char - L'0'; > } >=20 > - return (10 + InternalShellCharToUpper (Char) - L'A'); > + return (10 + CharToUpper (Char) - L'A'); > } >=20 > /** > @@ -3849,7 +3822,7 @@ InternalShellStrHexToUint64 ( > String++; > } >=20 > - if (InternalShellCharToUpper (*String) =3D=3D L'X') { > + if (CharToUpper (*String) =3D=3D L'X') { > if (*(String - 1) !=3D L'0') { > return 0; > } > -- > 2.18.0.windows.1