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.web08.196.1637771027060681758 for ; Wed, 24 Nov 2021 08:23:48 -0800 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 52AEC1042; Wed, 24 Nov 2021 08:23:48 -0800 (PST) Received: from e126645.nice.arm.com (e126645.nice.arm.com [10.34.125.4]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7ACDD3F66F; Wed, 24 Nov 2021 08:23:47 -0800 (PST) From: "PierreGondois" To: devel@edk2.groups.io Cc: Sami Mujawar Subject: [PATCH edk2-platforms v1 08/10] Platform/ARM: Fix Ecc error 3003 Date: Wed, 24 Nov 2021 17:23:28 +0100 Message-Id: <20211124162330.236813-9-Pierre.Gondois@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211124162330.236813-1-Pierre.Gondois@arm.com> References: <20211124162330.236813-1-Pierre.Gondois@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Pierre Gondois This patch fixes the following Ecc reported error: A comparison of any pointer to zero must be done via the NULL type Signed-off-by: Pierre Gondois --- Platform/ARM/JunoPkg/Drivers/SataSiI3132Dxe/SataSiI3132.c | 4 ++-- .../ARM/JunoPkg/Drivers/SataSiI3132Dxe/SiI3132AtaPassThru.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Platform/ARM/JunoPkg/Drivers/SataSiI3132Dxe/SataSiI3132.c b/= Platform/ARM/JunoPkg/Drivers/SataSiI3132Dxe/SataSiI3132.c index ad7cc1cd75a1..6f2ce401b3cc 100644 --- a/Platform/ARM/JunoPkg/Drivers/SataSiI3132Dxe/SataSiI3132.c +++ b/Platform/ARM/JunoPkg/Drivers/SataSiI3132Dxe/SataSiI3132.c @@ -91,7 +91,7 @@ SataSiI3132Constructor ( SATA_SI3132_INSTANCE *Instance; EFI_ATA_PASS_THRU_MODE *AtaPassThruMode; - if (!SataSiI3132Instance) { + if (SataSiI3132Instance =3D=3D NULL) { return EFI_INVALID_PARAMETER; } @@ -223,7 +223,7 @@ SataSiI3132Initialization ( UINTN Index; EFI_PCI_IO_PROTOCOL* PciIo; - if (!SataSiI3132Instance) { + if (SataSiI3132Instance =3D=3D NULL) { return EFI_INVALID_PARAMETER; } diff --git a/Platform/ARM/JunoPkg/Drivers/SataSiI3132Dxe/SiI3132AtaPassTh= ru.c b/Platform/ARM/JunoPkg/Drivers/SataSiI3132Dxe/SiI3132AtaPassThru.c index f15b59788310..0ec53782835b 100644 --- a/Platform/ARM/JunoPkg/Drivers/SataSiI3132Dxe/SiI3132AtaPassThru.c +++ b/Platform/ARM/JunoPkg/Drivers/SataSiI3132Dxe/SiI3132AtaPassThru.c @@ -260,7 +260,7 @@ SiI3132AtaPassThruCommand ( // Clear Command Complete SATA_PORT_WRITE32 (SataPort->RegBase + SII3132_PORT_INTSTATUS_REG, S= II3132_PORT_INT_CMDCOMPL << 16); - if (PciAllocMapping) { + if (PciAllocMapping !=3D NULL) { Status =3D PciIo->Unmap (PciIo, PciAllocMapping); ASSERT (!EFI_ERROR (Status)); } -- 2.25.1