public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2] BaseTools: Fixed the multiple pairs brackets issue in GenFv
@ 2022-10-20  9:25 Chao Li
  2022-10-20  9:32 ` 回复: [edk2-devel] " gaoliming
  2022-10-22 12:47 ` Bob Feng
  0 siblings, 2 replies; 3+ messages in thread
From: Chao Li @ 2022-10-20  9:25 UTC (permalink / raw)
  To: devel; +Cc: Bob Feng, Liming Gao, Yuwei Chen

If operation Werro is turned on when compiling BaseTools, the
multi-brackets warning will be reported. This issue is comes from on of
the LoongArch enabled patche. Removed extra pairs brackets to fix it.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4111

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
---
 BaseTools/Source/C/GenFv/GenFvInternalLib.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
index 5c3d54f5f7..b5b9425003 100644
--- a/BaseTools/Source/C/GenFv/GenFvInternalLib.c
+++ b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
@@ -3559,7 +3559,7 @@ Returns:
       }
 
       // Machine type is LOONGARCH64, set a flag so LoongArch64 reset vector processed.
-      if ((MachineType == EFI_IMAGE_MACHINE_LOONGARCH64)) {
+      if (MachineType == EFI_IMAGE_MACHINE_LOONGARCH64) {
         VerboseMsg("Located LoongArch64 SEC core in child FV");
         mLoongArch = TRUE;
       }
@@ -3721,7 +3721,7 @@ Returns:
       mRiscV = TRUE;
     }
 
-    if ( (ImageContext.Machine == EFI_IMAGE_MACHINE_LOONGARCH64) ) {
+    if (ImageContext.Machine == EFI_IMAGE_MACHINE_LOONGARCH64) {
       mLoongArch = TRUE;
     }
 
@@ -4002,7 +4002,7 @@ Returns:
       mArm = TRUE;
     }
 
-    if ( (ImageContext.Machine == EFI_IMAGE_MACHINE_LOONGARCH64) ) {
+    if (ImageContext.Machine == EFI_IMAGE_MACHINE_LOONGARCH64) {
       mLoongArch = TRUE;
     }
 
-- 
2.27.0


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

* 回复: [edk2-devel] [PATCH v2] BaseTools: Fixed the multiple pairs brackets issue in GenFv
  2022-10-20  9:25 [PATCH v2] BaseTools: Fixed the multiple pairs brackets issue in GenFv Chao Li
@ 2022-10-20  9:32 ` gaoliming
  2022-10-22 12:47 ` Bob Feng
  1 sibling, 0 replies; 3+ messages in thread
From: gaoliming @ 2022-10-20  9:32 UTC (permalink / raw)
  To: devel, lichao; +Cc: 'Bob Feng', 'Yuwei Chen'

Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>

> -----邮件原件-----
> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Chao Li
> 发送时间: 2022年10月20日 17:25
> 收件人: devel@edk2.groups.io
> 抄送: Bob Feng <bob.c.feng@intel.com>; Liming Gao
> <gaoliming@byosoft.com.cn>; Yuwei Chen <yuwei.chen@intel.com>
> 主题: [edk2-devel] [PATCH v2] BaseTools: Fixed the multiple pairs brackets
> issue in GenFv
> 
> If operation Werro is turned on when compiling BaseTools, the
> multi-brackets warning will be reported. This issue is comes from on of
> the LoongArch enabled patche. Removed extra pairs brackets to fix it.
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4111
> 
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> Signed-off-by: Chao Li <lichao@loongson.cn>
> ---
>  BaseTools/Source/C/GenFv/GenFvInternalLib.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c
> b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
> index 5c3d54f5f7..b5b9425003 100644
> --- a/BaseTools/Source/C/GenFv/GenFvInternalLib.c
> +++ b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
> @@ -3559,7 +3559,7 @@ Returns:
>        }
> 
> 
> 
>        // Machine type is LOONGARCH64, set a flag so LoongArch64 reset
> vector processed.
> 
> -      if ((MachineType == EFI_IMAGE_MACHINE_LOONGARCH64)) {
> 
> +      if (MachineType == EFI_IMAGE_MACHINE_LOONGARCH64) {
> 
>          VerboseMsg("Located LoongArch64 SEC core in child FV");
> 
>          mLoongArch = TRUE;
> 
>        }
> 
> @@ -3721,7 +3721,7 @@ Returns:
>        mRiscV = TRUE;
> 
>      }
> 
> 
> 
> -    if ( (ImageContext.Machine == EFI_IMAGE_MACHINE_LOONGARCH64) )
> {
> 
> +    if (ImageContext.Machine == EFI_IMAGE_MACHINE_LOONGARCH64) {
> 
>        mLoongArch = TRUE;
> 
>      }
> 
> 
> 
> @@ -4002,7 +4002,7 @@ Returns:
>        mArm = TRUE;
> 
>      }
> 
> 
> 
> -    if ( (ImageContext.Machine == EFI_IMAGE_MACHINE_LOONGARCH64) )
> {
> 
> +    if (ImageContext.Machine == EFI_IMAGE_MACHINE_LOONGARCH64) {
> 
>        mLoongArch = TRUE;
> 
>      }
> 
> 
> 
> --
> 2.27.0
> 
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#95422): https://edk2.groups.io/g/devel/message/95422
> Mute This Topic: https://groups.io/mt/94450039/4905953
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub
> [gaoliming@byosoft.com.cn]
> -=-=-=-=-=-=
> 




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

* Re: [edk2-devel] [PATCH v2] BaseTools: Fixed the multiple pairs brackets issue in GenFv
  2022-10-20  9:25 [PATCH v2] BaseTools: Fixed the multiple pairs brackets issue in GenFv Chao Li
  2022-10-20  9:32 ` 回复: [edk2-devel] " gaoliming
@ 2022-10-22 12:47 ` Bob Feng
  1 sibling, 0 replies; 3+ messages in thread
From: Bob Feng @ 2022-10-22 12:47 UTC (permalink / raw)
  To: devel@edk2.groups.io, lichao@loongson.cn; +Cc: Gao, Liming, Chen, Christine

Reviewed-by: Bob Feng <bob.c.feng@intel.com>

-----Original Message-----
From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Chao Li
Sent: Thursday, October 20, 2022 5:25 PM
To: devel@edk2.groups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>
Subject: [edk2-devel] [PATCH v2] BaseTools: Fixed the multiple pairs brackets issue in GenFv

If operation Werro is turned on when compiling BaseTools, the multi-brackets warning will be reported. This issue is comes from on of the LoongArch enabled patche. Removed extra pairs brackets to fix it.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4111

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
---
 BaseTools/Source/C/GenFv/GenFvInternalLib.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
index 5c3d54f5f7..b5b9425003 100644
--- a/BaseTools/Source/C/GenFv/GenFvInternalLib.c
+++ b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
@@ -3559,7 +3559,7 @@ Returns:
       }        // Machine type is LOONGARCH64, set a flag so LoongArch64 reset vector processed.-      if ((MachineType == EFI_IMAGE_MACHINE_LOONGARCH64)) {+      if (MachineType == EFI_IMAGE_MACHINE_LOONGARCH64) {         VerboseMsg("Located LoongArch64 SEC core in child FV");         mLoongArch = TRUE;       }@@ -3721,7 +3721,7 @@ Returns:
       mRiscV = TRUE;     } -    if ( (ImageContext.Machine == EFI_IMAGE_MACHINE_LOONGARCH64) ) {+    if (ImageContext.Machine == EFI_IMAGE_MACHINE_LOONGARCH64) {       mLoongArch = TRUE;     } @@ -4002,7 +4002,7 @@ Returns:
       mArm = TRUE;     } -    if ( (ImageContext.Machine == EFI_IMAGE_MACHINE_LOONGARCH64) ) {+    if (ImageContext.Machine == EFI_IMAGE_MACHINE_LOONGARCH64) {       mLoongArch = TRUE;     } -- 
2.27.0



-=-=-=-=-=-=
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#95422): https://edk2.groups.io/g/devel/message/95422
Mute This Topic: https://groups.io/mt/94450039/1768742
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [bob.c.feng@intel.com] -=-=-=-=-=-=



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

end of thread, other threads:[~2022-10-22 12:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-20  9:25 [PATCH v2] BaseTools: Fixed the multiple pairs brackets issue in GenFv Chao Li
2022-10-20  9:32 ` 回复: [edk2-devel] " gaoliming
2022-10-22 12:47 ` Bob Feng

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