public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Chandni Cherukuri <chandni.cherukuri@arm.com>
To: edk2-devel@lists.01.org
Subject: [PATCH edk2-platforms 1/2] Platform/ARM/Sgi: fix incorrect check of config-id value
Date: Tue,  4 Dec 2018 17:06:17 +0530	[thread overview]
Message-ID: <1543923378-16820-2-git-send-email-chandni.cherukuri@arm.com> (raw)
In-Reply-To: <1543923378-16820-1-git-send-email-chandni.cherukuri@arm.com>

On SGI platform, the value of configuration ID can be zero.
So avoid returning an error from the function that creates
the system ID HOB in case the value of the configuration ID
is zero.

While at it, improve some of the error messages as well.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chandni Cherukuri <chandni.cherukuri@arm.com>
---
 Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c b/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c
index 15ea571..065b23d 100644
--- a/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c
+++ b/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c
@@ -67,7 +67,7 @@ GetSgiSystemId (
 
   Property = fdt_getprop (HwCfgDtBlob, Offset, "platform-id", NULL);
   if (Property == NULL) {
-    DEBUG ((DEBUG_ERROR, "Platform Id is NULL\n"));
+    DEBUG ((DEBUG_ERROR, "platform-id property not found\n"));
     return EFI_INVALID_PARAMETER;
   }
 
@@ -75,7 +75,7 @@ GetSgiSystemId (
 
   Property = fdt_getprop (HwCfgDtBlob, Offset, "config-id", NULL);
   if (Property == NULL) {
-    DEBUG ((DEBUG_ERROR, "Config Id is NULL\n"));
+    DEBUG ((DEBUG_ERROR, "config-id property not found\n"));
     return EFI_INVALID_PARAMETER;
   }
 
@@ -121,7 +121,7 @@ SgiPlatformPeim (
     return EFI_INVALID_PARAMETER;
   }
 
-  if (HobData->PlatformId == 0 || HobData->ConfigId == 0) {
+  if (HobData->PlatformId == 0) {
     ASSERT (FALSE);
     return EFI_INVALID_PARAMETER;
   }
-- 
2.7.4



  reply	other threads:[~2018-12-04 11:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-04 11:36 [PATCH edk2-platforms 0/2] Use NT_FW_CONFIG instead of HW_CONFIG Chandni Cherukuri
2018-12-04 11:36 ` Chandni Cherukuri [this message]
2018-12-04 14:55   ` [PATCH edk2-platforms 1/2] Platform/ARM/Sgi: fix incorrect check of config-id value Ard Biesheuvel
2018-12-05  4:16     ` chandni cherukuri
2018-12-04 11:36 ` [PATCH edk2-platforms 2/2] Platform/ARM/Sgi: Use NT_FW_CONFIG instead of HW_CONFIG Chandni Cherukuri
2018-12-06 15:42   ` Thomas Abraham
2018-12-06 16:55     ` Ard Biesheuvel
2018-12-06 18:01       ` Thomas Abraham

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=1543923378-16820-2-git-send-email-chandni.cherukuri@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