public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: evan.lloyd@arm.com
To: edk2-devel@lists.01.org
Cc: "ard.biesheuvel@linaro.org"@arm.com,
	"leif.lindholm@linaro.org"@arm.com,
	"Matteo.Carlini@arm.com"@arm.com, "nd@arm.com"@arm.com
Subject: [PATCH v2 04/13] ArmPlatformPkg: HDLCD and PL111: Update debug ASSERTS
Date: Fri, 22 Dec 2017 18:34:09 +0000	[thread overview]
Message-ID: <20171222183418.8616-5-evan.lloyd@arm.com> (raw)
In-Reply-To: <20171222183418.8616-1-evan.lloyd@arm.com>

From: Girish Pathak <girish.pathak at arm.com>

This change moves some ASSERTs in error handling code
to improve efficiency in DEBUG build.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Girish Pathak <girish.pathak@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
---
 ArmPlatformPkg/Library/HdLcd/HdLcd.c       | 11 ++++-------
 ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c |  8 ++++----
 2 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/ArmPlatformPkg/Library/HdLcd/HdLcd.c b/ArmPlatformPkg/Library/HdLcd/HdLcd.c
index a1eeabfefe7d32e6182371e5b131ac5df0dd4dd7..d71b6020dc0c4b91e74d16e96b06a60601b9628a 100644
--- a/ArmPlatformPkg/Library/HdLcd/HdLcd.c
+++ b/ArmPlatformPkg/Library/HdLcd/HdLcd.c
@@ -122,15 +122,15 @@ LcdSetMode (
              &VBackPorch,
              &VFrontPorch
              );
-  ASSERT_EFI_ERROR (Status);
   if (EFI_ERROR (Status)) {
-    return EFI_DEVICE_ERROR;
+    ASSERT (FALSE);
+    return Status;
   }
 
   Status = LcdPlatformGetBpp (ModeNumber, &LcdBpp);
-  ASSERT_EFI_ERROR (Status);
   if (EFI_ERROR (Status)) {
-    return EFI_DEVICE_ERROR;
+    ASSERT (FALSE);
+    return Status;
   }
 
   BytesPerPixel = GetBytesPerPixel (LcdBpp);
@@ -174,9 +174,6 @@ LcdShutdown (VOID)
 
   @retval EFI_SUCCESS            Returns success if platform implements a HDLCD
                                  controller.
-
-  @retval EFI_NOT_FOUND          HDLCD display controller not found on the
-                                 platform
 **/
 EFI_STATUS
 LcdIdentify (VOID)
diff --git a/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c b/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c
index 53b402f711ff10d70feba38671171c027a98b4ba..267c972bf795997f1df88b82acbaea5f75a7a00e 100644
--- a/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c
+++ b/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c
@@ -105,15 +105,15 @@ LcdSetMode (
              &VBackPorch,
              &VFrontPorch
              );
-  ASSERT_EFI_ERROR (Status);
   if (EFI_ERROR (Status)) {
-    return EFI_DEVICE_ERROR;
+    ASSERT (FALSE);
+    return Status;
   }
 
   Status = LcdPlatformGetBpp (ModeNumber, &LcdBpp);
-  ASSERT_EFI_ERROR (Status);
   if (EFI_ERROR (Status)) {
-    return EFI_DEVICE_ERROR;
+    ASSERT (FALSE);
+    return Status;
   }
 
   // Disable the CLCD_LcdEn bit
-- 
Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")



  parent reply	other threads:[~2017-12-22 18:29 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-22 18:34 [PATCH v2 00/13] ArmPlatformPkg: Update GOP evan.lloyd
2017-12-22 18:34 ` [PATCH v2 01/13] ArmPlatformPkg: Tidy Lcd code: Coding standard evan.lloyd
2017-12-23 13:19   ` Ard Biesheuvel
2018-01-02 15:11     ` Evan Lloyd
2018-01-02 15:21       ` Ard Biesheuvel
2018-01-02 15:21         ` Ard Biesheuvel
2018-01-03 16:06         ` Evan Lloyd
2017-12-22 18:34 ` [PATCH v2 02/13] ArmPlatformPkg: Tidy Lcd code: Updated comments evan.lloyd
2017-12-22 18:34 ` [PATCH v2 03/13] ArmPlatformPkg: PL111 and HDLCD: add const qualifier evan.lloyd
2017-12-23 13:21   ` Ard Biesheuvel
2017-12-22 18:34 ` evan.lloyd [this message]
2017-12-23 13:22   ` [PATCH v2 04/13] ArmPlatformPkg: HDLCD and PL111: Update debug ASSERTS Ard Biesheuvel
2017-12-22 18:34 ` [PATCH v2 05/13] ArmPlatformPkg: PL111Lcd: Replace magic number with macro evan.lloyd
2017-12-23 13:24   ` Ard Biesheuvel
2017-12-22 18:34 ` [PATCH v2 06/13] ArmPlatformPkg: Implement LcdIdentify function for HDLCD GOP evan.lloyd
2017-12-23 13:24   ` Ard Biesheuvel
2017-12-22 18:34 ` [PATCH v2 07/13] ArmPlatformPkg: Redefine LcdPlatformGetTimings function evan.lloyd
2017-12-23 13:27   ` Ard Biesheuvel
2017-12-22 18:34 ` [PATCH v2 08/13] ArmPlatformPkg: Add PCD to select pixel format evan.lloyd
2017-12-23 13:29   ` Ard Biesheuvel
2017-12-22 18:34 ` [PATCH v2 09/13] ArmPlatformPkg: PCD to swap red/blue format for HDLCD evan.lloyd
2017-12-23 13:34   ` Ard Biesheuvel
2017-12-22 18:34 ` [PATCH v2 10/13] ArmPlatformPkg: Additional display modes evan.lloyd
2017-12-23 13:35   ` Ard Biesheuvel
2017-12-22 18:34 ` [PATCH v2 11/13] ArmPlatformPkg: Reserving framebuffer at build evan.lloyd
2017-12-23 13:36   ` Ard Biesheuvel
2017-12-22 18:34 ` [PATCH v2 12/13] ArmPlatformPkg: New DP500/DP550/DP650 GOP driver evan.lloyd
2017-12-23 13:44   ` Ard Biesheuvel
2017-12-22 18:34 ` [PATCH v2 13/13] ArmPlatformPkg: Introduce SCMI protocol evan.lloyd
2017-12-23 14:05   ` Ard Biesheuvel

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=20171222183418.8616-5-evan.lloyd@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