From fd9cc2052e230742279edf5fa0a56159a19ef23c Mon Sep 17 00:00:00 2001 From: Pierre Gondois Date: Tue, 20 Apr 2021 14:04:04 +0100 Subject: ArmPkg: Fix Ecc error 3002 in StandaloneMmMmuLib This patch fixes the following Ecc reported error: Non-Boolean comparisons should use a compare operator (==, !=, >, < >=, <=) Cc: Bret Barkelew Cc: Sean Brogan Cc: Leif Lindholm Cc: Ard Biesheuvel Cc: Sami Mujawar Signed-off-by: Pierre Gondois Reviewed-by: Sami Mujawar --- ArmPkg/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 5f453d18e4..31672ae5cf 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. -- cgit v1.2.3