From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.9864.1619537580819044754 for ; Tue, 27 Apr 2021 08:33:00 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: pierre.gondois@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 76AA031B; Tue, 27 Apr 2021 08:33:00 -0700 (PDT) Received: from e120189.arm.com (unknown [10.57.3.114]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 06BD03F73B; Tue, 27 Apr 2021 08:32:58 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io, sami.mujawar@arm.com, leif@nuviainc.com, ardb+tianocore@kernel.org, sean.brogan@microsoft.com, Bret.Barkelew@microsoft.com Subject: [PATCH v2 02/15] ArmPkg: Fix Ecc error 3002 in StandaloneMmMmuLib Date: Tue, 27 Apr 2021 16:32:38 +0100 Message-Id: <20210427153251.11576-3-Pierre.Gondois@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210427153251.11576-1-Pierre.Gondois@arm.com> References: <20210427153251.11576-1-Pierre.Gondois@arm.com> From: Pierre Gondois 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 --- .../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