public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "PierreGondois" <pierre.gondois@arm.com>
To: devel@edk2.groups.io
Cc: Sami Mujawar <sami.mujawar@arm.com>
Subject: [PATCH edk2-platforms v1 08/10] Platform/ARM: Fix Ecc error 3003
Date: Wed, 24 Nov 2021 17:23:28 +0100	[thread overview]
Message-ID: <20211124162330.236813-9-Pierre.Gondois@arm.com> (raw)
In-Reply-To: <20211124162330.236813-1-Pierre.Gondois@arm.com>

From: Pierre Gondois <Pierre.Gondois@arm.com>

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 <Pierre.Gondois@arm.com>
---
 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 == NULL) {
     return EFI_INVALID_PARAMETER;
   }

@@ -223,7 +223,7 @@ SataSiI3132Initialization (
   UINTN                 Index;
   EFI_PCI_IO_PROTOCOL*  PciIo;

-  if (!SataSiI3132Instance) {
+  if (SataSiI3132Instance == NULL) {
     return EFI_INVALID_PARAMETER;
   }

diff --git a/Platform/ARM/JunoPkg/Drivers/SataSiI3132Dxe/SiI3132AtaPassThru.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, SII3132_PORT_INT_CMDCOMPL << 16);

-    if (PciAllocMapping) {
+    if (PciAllocMapping != NULL) {
       Status = PciIo->Unmap (PciIo, PciAllocMapping);
       ASSERT (!EFI_ERROR (Status));
     }
--
2.25.1

  parent reply	other threads:[~2021-11-24 16:23 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-24 16:23 [PATCH edk2-platforms v1 00/10] Fix Arm platforms CI errors PierreGondois
2021-11-24 16:23 ` [PATCH edk2-platforms v1 01/10] Platform/ARM: Modify duplicated GUID in PciHostBridgeLib PierreGondois
2021-12-17 14:14   ` Sami Mujawar
2021-11-24 16:23 ` [PATCH edk2-platforms v1 02/10] Platform/ARM: Modify duplicated GUID in ArmVExpressLib PierreGondois
2021-12-17 14:14   ` Sami Mujawar
2021-11-24 16:23 ` [PATCH edk2-platforms v1 03/10] Platform/ARM: Modify duplicated GUID in ArmVExpressLibSec PierreGondois
2021-12-17 13:59   ` Sami Mujawar
2021-12-17 14:15     ` PierreGondois
2021-12-17 16:30       ` Sami Mujawar
2021-12-17 16:33         ` [edk2-devel] " Ard Biesheuvel
2021-12-17 16:39           ` Sami Mujawar
2021-12-20  9:29             ` wenyi,xie
2021-11-24 16:23 ` [PATCH edk2-platforms v1 04/10] Platform/ARM: Modify duplicated GUID in ArmVExpressPkg.dec PierreGondois
2021-12-17 14:14   ` Sami Mujawar
2021-11-24 16:23 ` [PATCH edk2-platforms v1 05/10] Platform/ARM: Fix Ecc error 1001 PierreGondois
2021-12-17 14:15   ` Sami Mujawar
2021-11-24 16:23 ` [PATCH edk2-platforms v1 06/10] Platform/ARM: Fix Ecc error 1008 PierreGondois
2021-12-17 14:15   ` Sami Mujawar
2021-11-24 16:23 ` [PATCH edk2-platforms v1 07/10] Platform/ARM: Fix Ecc error 1012 PierreGondois
2021-12-17 14:15   ` Sami Mujawar
2021-11-24 16:23 ` PierreGondois [this message]
2021-12-17 14:15   ` [PATCH edk2-platforms v1 08/10] Platform/ARM: Fix Ecc error 3003 Sami Mujawar
2021-11-24 16:23 ` [PATCH edk2-platforms v1 09/10] Platform/ARM: Fix Ecc error 9005 PierreGondois
2021-12-17 14:15   ` Sami Mujawar
2021-11-24 16:23 ` [PATCH edk2-platforms v1 10/10] Platform/ARM: Fix Ecc error 5005 PierreGondois
2021-12-17 14:16   ` Sami Mujawar
2021-11-24 18:34 ` [edk2-devel] [PATCH edk2-platforms v1 00/10] Fix Arm platforms CI errors Chris Jones
2022-01-24 14:31   ` Sami Mujawar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211124162330.236813-9-Pierre.Gondois@arm.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox