[edk2] [Patch 0/3] Use comparison logic to check UINTN parameter in GetBestLanguage API

Liming Gao posted 3 patches 5 years, 10 months ago
Only 2 patches received!
IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c        | 6 +++---
MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c | 8 ++++----
MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c       | 8 ++++----
MdePkg/Library/UefiLib/UefiLib.c                            | 6 +++---
4 files changed, 14 insertions(+), 14 deletions(-)
[edk2] [Patch 0/3] Use comparison logic to check UINTN parameter in GetBestLanguage API
Posted by Liming Gao 5 years, 10 months ago
Liming Gao (3):
  MdePkg UefiLib: Use comparison logic to check UINTN parameter
  IntelFrameworkPkg UefiLib: Use comparison logic to check UINTN
    parameter
  MdeModulePkg Variable: Use comparison logic to check UINTN parameter

 IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c        | 6 +++---
 MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c | 8 ++++----
 MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c       | 8 ++++----
 MdePkg/Library/UefiLib/UefiLib.c                            | 6 +++---
 4 files changed, 14 insertions(+), 14 deletions(-)

-- 
2.8.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch 0/3] Use comparison logic to check UINTN parameter in GetBestLanguage API
Posted by Zeng, Star 5 years, 10 months ago
Reviewed-by: Star Zeng <star.zeng@intel.com>

-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Liming Gao
Sent: Monday, May 28, 2018 3:31 PM
To: edk2-devel@lists.01.org
Subject: [edk2] [Patch 0/3] Use comparison logic to check UINTN parameter in GetBestLanguage API

Liming Gao (3):
  MdePkg UefiLib: Use comparison logic to check UINTN parameter
  IntelFrameworkPkg UefiLib: Use comparison logic to check UINTN
    parameter
  MdeModulePkg Variable: Use comparison logic to check UINTN parameter

 IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c        | 6 +++---
 MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c | 8 ++++----
 MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c       | 8 ++++----
 MdePkg/Library/UefiLib/UefiLib.c                            | 6 +++---
 4 files changed, 14 insertions(+), 14 deletions(-)

-- 
2.8.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch 0/3] Use comparison logic to check UINTN parameter in GetBestLanguage API
Posted by Marvin H?user 5 years, 10 months ago
Hey Star and Liming,

May I propose re-considering the introduction of a third named parameter to reflect the first Language passed?
This would 1) have the advantage that the BOOLEAN parameter can remain as is, which increases readability and
2) require at least two parameters related to the language list passed. Having to write "NULL, NULL" is way more obvious than just having to write "NULL" when (accidentally?) not passing any language.

And error caused by this change would be calls that do not pass an expected amount of parameters for the call to make sense.

Thanks,
Marvin.

> -----Original Message-----
> From: edk2-devel <edk2-devel-bounces@lists.01.org> On Behalf Of Zeng,
> Star
> Sent: Monday, May 28, 2018 9:54 AM
> To: Gao, Liming <liming.gao@intel.com>; edk2-devel@lists.01.org
> Cc: Zeng, Star <star.zeng@intel.com>
> Subject: Re: [edk2] [Patch 0/3] Use comparison logic to check UINTN
> parameter in GetBestLanguage API
> 
> Reviewed-by: Star Zeng <star.zeng@intel.com>
> 
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> Liming Gao
> Sent: Monday, May 28, 2018 3:31 PM
> To: edk2-devel@lists.01.org
> Subject: [edk2] [Patch 0/3] Use comparison logic to check UINTN parameter
> in GetBestLanguage API
> 
> Liming Gao (3):
>   MdePkg UefiLib: Use comparison logic to check UINTN parameter
>   IntelFrameworkPkg UefiLib: Use comparison logic to check UINTN
>     parameter
>   MdeModulePkg Variable: Use comparison logic to check UINTN parameter
> 
>  IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c        | 6 +++---
>  MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c | 8
> ++++----
>  MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c       | 8 ++++----
>  MdePkg/Library/UefiLib/UefiLib.c                            | 6 +++---
>  4 files changed, 14 insertions(+), 14 deletions(-)
> 
> --
> 2.8.0.windows.1
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch 0/3] Use comparison logic to check UINTN parameter in GetBestLanguage API
Posted by Gao, Liming 5 years, 10 months ago
Marvin:
  Current solution is to keep max compatibility. 

Thanks
Liming
>-----Original Message-----
>From: Marvin H?user [mailto:Marvin.Haeuser@outlook.com]
>Sent: Monday, May 28, 2018 4:11 PM
>To: edk2-devel@lists.01.org
>Cc: Zeng, Star <star.zeng@intel.com>; Gao, Liming <liming.gao@intel.com>
>Subject: RE: [edk2] [Patch 0/3] Use comparison logic to check UINTN
>parameter in GetBestLanguage API
>
>Hey Star and Liming,
>
>May I propose re-considering the introduction of a third named parameter to
>reflect the first Language passed?
>This would 1) have the advantage that the BOOLEAN parameter can remain as
>is, which increases readability and
>2) require at least two parameters related to the language list passed. Having
>to write "NULL, NULL" is way more obvious than just having to write "NULL"
>when (accidentally?) not passing any language.
>
>And error caused by this change would be calls that do not pass an expected
>amount of parameters for the call to make sense.
>
>Thanks,
>Marvin.
>
>> -----Original Message-----
>> From: edk2-devel <edk2-devel-bounces@lists.01.org> On Behalf Of Zeng,
>> Star
>> Sent: Monday, May 28, 2018 9:54 AM
>> To: Gao, Liming <liming.gao@intel.com>; edk2-devel@lists.01.org
>> Cc: Zeng, Star <star.zeng@intel.com>
>> Subject: Re: [edk2] [Patch 0/3] Use comparison logic to check UINTN
>> parameter in GetBestLanguage API
>>
>> Reviewed-by: Star Zeng <star.zeng@intel.com>
>>
>> -----Original Message-----
>> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
>> Liming Gao
>> Sent: Monday, May 28, 2018 3:31 PM
>> To: edk2-devel@lists.01.org
>> Subject: [edk2] [Patch 0/3] Use comparison logic to check UINTN parameter
>> in GetBestLanguage API
>>
>> Liming Gao (3):
>>   MdePkg UefiLib: Use comparison logic to check UINTN parameter
>>   IntelFrameworkPkg UefiLib: Use comparison logic to check UINTN
>>     parameter
>>   MdeModulePkg Variable: Use comparison logic to check UINTN parameter
>>
>>  IntelFrameworkPkg/Library/FrameworkUefiLib/UefiLib.c        | 6 +++---
>>  MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c | 8
>> ++++----
>>  MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c       | 8 ++++----
>>  MdePkg/Library/UefiLib/UefiLib.c                            | 6 +++---
>>  4 files changed, 14 insertions(+), 14 deletions(-)
>>
>> --
>> 2.8.0.windows.1
>>
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.01.org
>> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel