From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=217.140.96.140; helo=cam-smtp0.cambridge.arm.com; envelope-from=evan.lloyd@arm.com; receiver=edk2-devel@lists.01.org Received: from cam-smtp0.cambridge.arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2C01D21A0292D for ; Fri, 22 Dec 2017 10:29:36 -0800 (PST) Received: from E111747.Emea.Arm.com (e111747.emea.arm.com [10.1.25.75]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id vBMIYOYZ007680; Fri, 22 Dec 2017 18:34:24 GMT 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 Date: Fri, 22 Dec 2017 18:34:09 +0000 Message-Id: <20171222183418.8616-5-evan.lloyd@arm.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171222183418.8616-1-evan.lloyd@arm.com> References: <20171222183418.8616-1-evan.lloyd@arm.com> Subject: [PATCH v2 04/13] ArmPlatformPkg: HDLCD and PL111: Update debug ASSERTS X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Dec 2017 18:29:37 -0000 From: Girish Pathak 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 Signed-off-by: Evan Lloyd --- 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")