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

Sami Mujawar sami.mujawar at arm.com
Thu Apr 22 09:40:57 UTC 2021


Hi Pierre,

Thank you for this patch.

Reviewed-by: Sami Mujawar <sami.mujawar at arm.com>

Regards,

Sami Mujawar
From: Pierre.Gondois at arm.com <Pierre.Gondois at arm.com>
Date: Wednesday, 21 April 2021 at 13:21
To: devel at edk2.groups.io <devel at edk2.groups.io>, Sami Mujawar <Sami.Mujawar at arm.com>, leif at nuviainc.com <leif at nuviainc.com>, ardb+tianocore at kernel.org <ardb+tianocore at kernel.org>, sean.brogan at microsoft.com <sean.brogan at microsoft.com>, Bret.Barkelew at microsoft.com <Bret.Barkelew at microsoft.com>
Subject: [PATCH v1 02/12] ArmPkg: Fix Ecc error 3002 in StandaloneMmMmuLib
From: Pierre Gondois <Pierre.Gondois at arm.com>

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

Signed-off-by: Pierre Gondois <Pierre.Gondois 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
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.


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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/edk2-devel-archive/attachments/20210422/1cc59e39/attachment.htm>


More information about the edk2-devel-archive mailing list