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.11339.1619007670275185170 for ; Wed, 21 Apr 2021 05:21:10 -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 E196311D4; Wed, 21 Apr 2021 05:21:09 -0700 (PDT) Received: from e120189.arm.com (unknown [10.57.26.208]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 40E0D3F694; Wed, 21 Apr 2021 05:21:08 -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 v1 02/12] ArmPkg: Fix Ecc error 3002 in StandaloneMmMmuLib Date: Wed, 21 Apr 2021 13:20:38 +0100 Message-Id: <20210421122048.11729-3-Pierre.Gondois@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210421122048.11729-1-Pierre.Gondois@arm.com> References: <20210421122048.11729-1-Pierre.Gondois@arm.com> From: Pierre Gondois This patch fixes the following Ecc reported error: Non-Boolean comparisons should use a compare operator (==, !=, >, < >=, <=) Signed-off-by: Pierre Gondois --- .../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