[edk2] [PATCH v3 3/3] MdeModulePkg/EbcDebugger: Remove an internal function AsciiToUpper

Wu, Hao A hao.a.wu at intel.com
Wed Dec 19 05:06:36 PST 2018


Hi,

I think the patch will bring issue with regard to bisecting.

One way to resolve this is to introduce a patch to rename the 'AsciiToUpper'
within file EdbSupportString.c to something like 'InternalAsciiToUpper'. And
make the new patch as the 1st one of the series. Then goes the remaining 3
patches of this version of the series.


I also have a question that will we perform a cleanup for other 'XXXToUpper'
functions within the code base?

I did a quick search for keyword 'ToUpper', and found some (not all) possible
candidates that can be replaced with the newly added BaseLib APIs:

FatPkg\FatPei\FatLiteLib.c
Line 34: ToUpper (

MdeModulePkg\Library\DxeHttpLib\DxeHttpLib.c
Line 911: HttpIoCharToUpper (

MdeModulePkg\Universal\EbcDxe\EbcDebugger\EdbSupportString.c
Line 319: UnicodeToUpper (

ShellPkg\Library\UefiShellDebug1CommandsLib\UefiShellDebug1CommandsLib.c
Line 134: CharToUpper (

ShellPkg\Library\UefiShellLib\UefiShellLib.c
Line 3759: InternalShellCharToUpper (


Best Regards,
Hao Wu

> -----Original Message-----
> From: Zhang, Shenglei
> Sent: Wednesday, December 19, 2018 4:43 PM
> To: edk2-devel at lists.01.org
> Cc: Wang, Jian J; Wu, Hao A; Zeng, Star
> Subject: [PATCH v3 3/3] MdeModulePkg/EbcDebugger: Remove an internal
> function AsciiToUpper
> 
> AsciiToUpper in EdbSupportString.c is an internal function.
> And we will introduce a public function which has the same name
> and effect. So we remove its implement. Code in EdbSupportString.c
> now consumes the public one.
> https://bugzilla.tianocore.org/show_bug.cgi?id=1369
> 
> Cc: Jian J Wang <jian.j.wang at intel.com>
> Cc: Hao Wu <hao.a.wu at intel.com>
> Cc: Star Zeng <star.zeng at intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Shenglei Zhang <shenglei.zhang at intel.com>
> ---
>  .../EbcDxe/EbcDebugger/EdbSupportString.c         | 15 ---------------
>  1 file changed, 15 deletions(-)
> 
> diff --git
> a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportString.c
> b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportString.c
> index 78a0559079..0eb894ddfb 100644
> --- a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportString.c
> +++ b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportString.c
> @@ -323,21 +323,6 @@ UnicodeToUpper (
>    return (Chr >= L'a' && Chr <= L'z') ? Chr - (L'a' - L'A') : Chr;
>  }
> 
> -/**
> -
> -  Convert the character to upper case.
> -
> -  @param  Chr    the character to be converted.
> -
> -**/
> -STATIC
> -CHAR8
> -AsciiToUpper (
> -  IN      CHAR8                     Chr
> -  )
> -{
> -  return (Chr >= 'a' && Chr <= 'z') ? Chr - ('a' - 'A') : Chr;
> -}
> 
>  /**
>    Compare the Unicode and Ascii string pointed by String to the string
> pointed by String2.
> --
> 2.18.0.windows.1



More information about the edk2-devel mailing list