public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [patch] UefiCpuPkg/CpuCommonFeaturesLib: Fix coding style issue
@ 2018-03-07  5:53 Dandan Bi
  2018-03-07  5:53 ` [patch] SecurityPkg/SmmTcg2PhysicalPresenceLib: " Dandan Bi
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Dandan Bi @ 2018-03-07  5:53 UTC (permalink / raw)
  To: edk2-devel; +Cc: Eric Dong, Laszlo Ersek, Ruiyu Ni

Boolean values do not need to use explicit comparisons
to TRUE or FALSE.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c b/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c
index cc64dbb..27ca911 100644
--- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c
+++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c
@@ -138,11 +138,11 @@ McaInitialize (
   )
 {
   MSR_IA32_MCG_CAP_REGISTER  McgCap;
   UINT32                     BankIndex;
 
-  if (State == TRUE) {
+  if (State) {
     McgCap.Uint64 = AsmReadMsr64 (MSR_IA32_MCG_CAP);
     for (BankIndex = 0; BankIndex < (UINT32) McgCap.Bits.Count; BankIndex++) {
       CPU_REGISTER_TABLE_WRITE64 (
         ProcessorNumber,
         Msr,
-- 
1.9.5.msysgit.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [patch] SecurityPkg/SmmTcg2PhysicalPresenceLib: Fix coding style issue
  2018-03-07  5:53 [patch] UefiCpuPkg/CpuCommonFeaturesLib: Fix coding style issue Dandan Bi
@ 2018-03-07  5:53 ` Dandan Bi
  2018-03-07  7:42   ` Zhang, Chao B
  2018-03-07  5:55 ` [patch] UefiCpuPkg/CpuCommonFeaturesLib: " Ni, Ruiyu
  2018-03-07  9:07 ` Laszlo Ersek
  2 siblings, 1 reply; 5+ messages in thread
From: Dandan Bi @ 2018-03-07  5:53 UTC (permalink / raw)
  To: edk2-devel; +Cc: Chao Zhang

Boolean values do not need to use explicit comparisons
to TRUE or FALSE.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 .../Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c b/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c
index dfef6c8..6a4dce9 100644
--- a/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c
+++ b/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c
@@ -339,11 +339,11 @@ Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunction (
     case TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_ENABLE_BLOCK_SID_FUNC_FALSE:
     case TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_DISABLE_BLOCK_SID_FUNC_FALSE:
       break;
 
     default:
-      if (mIsTcg2PPVerLowerThan_1_3 == FALSE) {
+      if (!mIsTcg2PPVerLowerThan_1_3) {
         if (OperationRequest < TCG2_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION) {
           //
           // TCG2 PP1.3 spec defined operations that are reserved or un-implemented
           //
           return TCG_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED;
-- 
1.9.5.msysgit.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [patch] UefiCpuPkg/CpuCommonFeaturesLib: Fix coding style issue
  2018-03-07  5:53 [patch] UefiCpuPkg/CpuCommonFeaturesLib: Fix coding style issue Dandan Bi
  2018-03-07  5:53 ` [patch] SecurityPkg/SmmTcg2PhysicalPresenceLib: " Dandan Bi
@ 2018-03-07  5:55 ` Ni, Ruiyu
  2018-03-07  9:07 ` Laszlo Ersek
  2 siblings, 0 replies; 5+ messages in thread
From: Ni, Ruiyu @ 2018-03-07  5:55 UTC (permalink / raw)
  To: Dandan Bi, edk2-devel; +Cc: Eric Dong, Laszlo Ersek

On 3/7/2018 1:53 PM, Dandan Bi wrote:
> Boolean values do not need to use explicit comparisons
> to TRUE or FALSE.
> 
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>   UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c b/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c
> index cc64dbb..27ca911 100644
> --- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c
> +++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c
> @@ -138,11 +138,11 @@ McaInitialize (
>     )
>   {
>     MSR_IA32_MCG_CAP_REGISTER  McgCap;
>     UINT32                     BankIndex;
>   
> -  if (State == TRUE) {
> +  if (State) {
>       McgCap.Uint64 = AsmReadMsr64 (MSR_IA32_MCG_CAP);
>       for (BankIndex = 0; BankIndex < (UINT32) McgCap.Bits.Count; BankIndex++) {
>         CPU_REGISTER_TABLE_WRITE64 (
>           ProcessorNumber,
>           Msr,
> 
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

-- 
Thanks,
Ray


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] SecurityPkg/SmmTcg2PhysicalPresenceLib: Fix coding style issue
  2018-03-07  5:53 ` [patch] SecurityPkg/SmmTcg2PhysicalPresenceLib: " Dandan Bi
@ 2018-03-07  7:42   ` Zhang, Chao B
  0 siblings, 0 replies; 5+ messages in thread
From: Zhang, Chao B @ 2018-03-07  7:42 UTC (permalink / raw)
  To: Bi, Dandan, edk2-devel@lists.01.org

Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>

-----Original Message-----
From: Bi, Dandan 
Sent: Wednesday, March 7, 2018 1:54 PM
To: edk2-devel@lists.01.org
Cc: Zhang, Chao B <chao.b.zhang@intel.com>
Subject: [patch] SecurityPkg/SmmTcg2PhysicalPresenceLib: Fix coding style issue

Boolean values do not need to use explicit comparisons to TRUE or FALSE.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 .../Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c b/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c
index dfef6c8..6a4dce9 100644
--- a/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c
+++ b/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPres
+++ enceLib.c
@@ -339,11 +339,11 @@ Tcg2PhysicalPresenceLibGetUserConfirmationStatusFunction (
     case TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_ENABLE_BLOCK_SID_FUNC_FALSE:
     case TCG2_PHYSICAL_PRESENCE_SET_PP_REQUIRED_FOR_DISABLE_BLOCK_SID_FUNC_FALSE:
       break;
 
     default:
-      if (mIsTcg2PPVerLowerThan_1_3 == FALSE) {
+      if (!mIsTcg2PPVerLowerThan_1_3) {
         if (OperationRequest < TCG2_PHYSICAL_PRESENCE_VENDOR_SPECIFIC_OPERATION) {
           //
           // TCG2 PP1.3 spec defined operations that are reserved or un-implemented
           //
           return TCG_PP_GET_USER_CONFIRMATION_NOT_IMPLEMENTED;
--
1.9.5.msysgit.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] UefiCpuPkg/CpuCommonFeaturesLib: Fix coding style issue
  2018-03-07  5:53 [patch] UefiCpuPkg/CpuCommonFeaturesLib: Fix coding style issue Dandan Bi
  2018-03-07  5:53 ` [patch] SecurityPkg/SmmTcg2PhysicalPresenceLib: " Dandan Bi
  2018-03-07  5:55 ` [patch] UefiCpuPkg/CpuCommonFeaturesLib: " Ni, Ruiyu
@ 2018-03-07  9:07 ` Laszlo Ersek
  2 siblings, 0 replies; 5+ messages in thread
From: Laszlo Ersek @ 2018-03-07  9:07 UTC (permalink / raw)
  To: Dandan Bi, edk2-devel; +Cc: Eric Dong, Ruiyu Ni

On 03/07/18 06:53, Dandan Bi wrote:
> Boolean values do not need to use explicit comparisons
> to TRUE or FALSE.
> 
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c b/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c
> index cc64dbb..27ca911 100644
> --- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c
> +++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c
> @@ -138,11 +138,11 @@ McaInitialize (
>    )
>  {
>    MSR_IA32_MCG_CAP_REGISTER  McgCap;
>    UINT32                     BankIndex;
>  
> -  if (State == TRUE) {
> +  if (State) {
>      McgCap.Uint64 = AsmReadMsr64 (MSR_IA32_MCG_CAP);
>      for (BankIndex = 0; BankIndex < (UINT32) McgCap.Bits.Count; BankIndex++) {
>        CPU_REGISTER_TABLE_WRITE64 (
>          ProcessorNumber,
>          Msr,
> 

Reviewed-by: Laszlo Ersek <lersek@redhat.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-03-07  9:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-07  5:53 [patch] UefiCpuPkg/CpuCommonFeaturesLib: Fix coding style issue Dandan Bi
2018-03-07  5:53 ` [patch] SecurityPkg/SmmTcg2PhysicalPresenceLib: " Dandan Bi
2018-03-07  7:42   ` Zhang, Chao B
2018-03-07  5:55 ` [patch] UefiCpuPkg/CpuCommonFeaturesLib: " Ni, Ruiyu
2018-03-07  9:07 ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox