[edk2-devel] [PATCH v3 02/15] ArmPkg: Fix Ecc error 3002 in StandaloneMmMmuLib

PierreGondois pierre.gondois at arm.com
Wed Apr 28 10:20:07 UTC 2021


From: Pierre Gondois <Pierre.Gondois at arm.com>

This patch fixes the following Ecc reported error:
Non-Boolean comparisons should use a compare operator
(==, !=, >, < >=, <=)

Cc: Bret Barkelew <bret.barkelew at microsoft.com>
Cc: Sean Brogan <sean.brogan at microsoft.com>
Cc: Leif Lindholm <leif at nuviainc.com>
Cc: Ard Biesheuvel <ardb+tianocore at kernel.org>
Cc: Sami Mujawar <sami.mujawar at arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois at arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar at arm.com>
---
 .../Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c b/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c
index 5f453d18e415..31672ae5cf4d 100644
--- a/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c
+++ b/ArmPkg/Library/StandaloneMmMmuLib/AArch64/ArmMmuStandaloneMmLib.c
@@ -101,7 +101,7 @@ SendMemoryPermissionRequest (
   }
 
   // Check error response from Callee.
-  if (*RetVal & BIT31) {
+  if ((*RetVal & BIT31) != 0) {
     // Bit 31 set means there is an error retured
     // See [1], Section 13.5.5.1 MM_SP_MEMORY_ATTRIBUTES_GET_AARCH64 and
     // Section 13.5.5.2 MM_SP_MEMORY_ATTRIBUTES_SET_AARCH64.
-- 
2.17.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#74516): https://edk2.groups.io/g/devel/message/74516
Mute This Topic: https://groups.io/mt/82426076/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list