From: Evan Lloyd <Evan.Lloyd@arm.com>
To: Girish Pathak <Girish.Pathak@arm.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: nd <nd@arm.com>,
Stephanie Hughes-Fitt <Stephanie.Hughes-Fitt@arm.com>,
"leif.lindholm@linaro.org" <leif.lindholm@linaro.org>,
"ard.biesheuvel@linaro.org" <ard.biesheuvel@linaro.org>
Subject: Re: [PATCH v3 05/16] ArmPlatformPkg: HDLCD and PL111: Update debug ASSERTS
Date: Wed, 21 Mar 2018 12:53:11 +0000 [thread overview]
Message-ID: <HE1PR0801MB1771F8F31246524E721940B58BAA0@HE1PR0801MB1771.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <20180320161212.79120-6-girish.pathak@arm.com>
Reviewed-by: Evan Lloyd <evan.lloyd@arm.com>
> -----Original Message-----
> From: edk2-devel <edk2-devel-bounces@lists.01.org> On Behalf Of Girish
> Pathak
> Sent: 20 March 2018 16:12
> To: edk2-devel@lists.01.org
> Cc: nd <nd@arm.com>; Stephanie Hughes-Fitt <Stephanie.Hughes-
> Fitt@arm.com>; leif.lindholm@linaro.org; ard.biesheuvel@linaro.org
> Subject: [edk2] [PATCH v3 05/16] ArmPlatformPkg: HDLCD and PL111:
> Update debug ASSERTS
>
> From: Girish Pathak <girish.pathak at arm.com>
>
> This change moves some ASSERTs in error handling code to improve
> efficiency in DEBUG build. This change also removes redundant error code
> returns.
>
> 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>
> ---
>
> Notes:
> v3:
> - Reverted to ASSERT_EFI_ERROR (Status) from ASSERT (FALSE)
>
> ArmPlatformPkg/Library/HdLcd/HdLcd.c | 11 +++++------
> ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c | 12 ++++++------
> 2 files changed, 11 insertions(+), 12 deletions(-)
>
> diff --git a/ArmPlatformPkg/Library/HdLcd/HdLcd.c
> b/ArmPlatformPkg/Library/HdLcd/HdLcd.c
> index
> be4ccfdc1f421060faec792c8e8acfcfb3232014..28306c530e08b5e0fcef430
> 8435045da3c9e093c 100644
> --- a/ArmPlatformPkg/Library/HdLcd/HdLcd.c
> +++ b/ArmPlatformPkg/Library/HdLcd/HdLcd.c
> @@ -90,8 +90,7 @@ LcdInitialize (
> @param[in] ModeNumber Display mode number.
>
> @retval EFI_SUCCESS Display mode set successfully.
> - @retval EFI_DEVICE_ERROR Reurns an error if display timing
> - information is not available.
> + @retval !(EFI_SUCCESS) Other errors.
> **/
> EFI_STATUS
> LcdSetMode (
> @@ -122,15 +121,15 @@ LcdSetMode (
> &VBackPorch,
> &VFrontPorch
> );
> - ASSERT_EFI_ERROR (Status);
> if (EFI_ERROR (Status)) {
> - return EFI_DEVICE_ERROR;
> + ASSERT_EFI_ERROR (Status);
> + return Status;
> }
>
> Status = LcdPlatformGetBpp (ModeNumber, &LcdBpp);
> - ASSERT_EFI_ERROR (Status);
> if (EFI_ERROR (Status)) {
> - return EFI_DEVICE_ERROR;
> + ASSERT_EFI_ERROR (Status);
> + return Status;
> }
>
> BytesPerPixel = GetBytesPerPixel (LcdBpp); diff --git
> a/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c
> b/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c
> index
> ccd7a4d1d43ad5c2f495683ac68236e17f3b55a5..cb64c57dd79f3bb1345e4
> d3dbda7f5b3ce859f40 100644
> --- a/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c
> +++ b/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c
> @@ -75,8 +75,8 @@ LcdInitialize (
> @param[in] ModeNumbe Display mode number.
>
> @retval EFI_SUCCESS Display mode set successfuly.
> - @retval EFI_DEVICE_ERROR It returns an error if display timing
> - information is not available.
> + @retval !(EFI_SUCCESS) Other errors.
> +
> **/
> EFI_STATUS
> LcdSetMode (
> @@ -107,15 +107,15 @@ LcdSetMode (
> &VBackPorch,
> &VFrontPorch
> );
> - ASSERT_EFI_ERROR (Status);
> if (EFI_ERROR (Status)) {
> - return EFI_DEVICE_ERROR;
> + ASSERT_EFI_ERROR (Status);
> + return Status;
> }
>
> Status = LcdPlatformGetBpp (ModeNumber, &LcdBpp);
> - ASSERT_EFI_ERROR (Status);
> if (EFI_ERROR (Status)) {
> - return EFI_DEVICE_ERROR;
> + ASSERT_EFI_ERROR (Status);
> + return Status;
> }
>
> // Disable the CLCD_LcdEn bit
> --
> 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
>
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
next prev parent reply other threads:[~2018-03-21 12:46 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-20 16:11 [PATCH v3 00/16] Update GOP Girish Pathak
2018-03-20 16:11 ` [PATCH v3 01/16] ArmPlatformPkg: Rectify line endings of LcdHwNullLib Girish Pathak
2018-03-21 12:53 ` Evan Lloyd
2018-03-20 16:11 ` [PATCH v3 02/16] ArmPlatformPkg: Rectify line endings of LcdPlatformNullLib Girish Pathak
2018-03-21 12:53 ` Evan Lloyd
2018-03-20 16:11 ` [PATCH v3 03/16] ArmPlatformPkg: Tidy Lcd code: Coding standard Girish Pathak
2018-03-21 12:53 ` Evan Lloyd
2018-03-20 16:12 ` [PATCH v3 04/16] ArmPlatformPkg: Tidy Lcd code: Updated comments Girish Pathak
2018-03-21 12:53 ` Evan Lloyd
2018-03-20 16:12 ` [PATCH v3 05/16] ArmPlatformPkg: HDLCD and PL111: Update debug ASSERTS Girish Pathak
2018-03-21 12:53 ` Evan Lloyd [this message]
2018-03-20 16:12 ` [PATCH v3 06/16] ArmPlatformPkg: PL111Lcd: Replace magic number with macro Girish Pathak
2018-03-21 12:26 ` Evan Lloyd
2018-03-20 16:12 ` [PATCH v3 07/16] ArmPlatformPkg: PL111Lcd: Combine two writes to LCDControl Girish Pathak
2018-03-21 12:26 ` Evan Lloyd
2018-03-20 16:12 ` [PATCH v3 08/16] ArmPlatformPkg: Implement LcdIdentify function for HDLCD GOP Girish Pathak
2018-03-21 12:26 ` Evan Lloyd
2018-03-20 16:12 ` [PATCH v3 09/16] ArmPlatformPkg: Redefine LcdPlatformGetTimings function Girish Pathak
2018-03-21 12:53 ` Evan Lloyd
2018-03-20 16:12 ` [PATCH v3 10/16] ArmPlatformPkg: Add PCD to select pixel format Girish Pathak
2018-03-21 12:53 ` Evan Lloyd
2018-03-20 16:12 ` [PATCH v3 11/16] ArmPlatformPkg: PCD to swap red/blue format for HDLCD Girish Pathak
2018-03-21 12:53 ` Evan Lloyd
2018-03-20 16:12 ` [PATCH v3 12/16] ArmPlatformPkg: Additional display modes Girish Pathak
2018-03-21 12:54 ` Evan Lloyd
2018-03-20 16:12 ` [PATCH v3 13/16] ArmPlatformPkg: Reserving framebuffer at build Girish Pathak
2018-03-21 12:54 ` Evan Lloyd
2018-03-20 16:12 ` [PATCH v3 14/16] ArmPlatformPkg: New DP500/DP550/DP650 GOP driver Girish Pathak
2018-03-21 12:54 ` Evan Lloyd
2018-04-23 11:07 ` Leif Lindholm
2018-03-20 16:12 ` [PATCH v3 15/16] ArmPkg: MTL Library interface and Null library implementation Girish Pathak
2018-03-21 12:54 ` Evan Lloyd
2018-04-23 11:11 ` Leif Lindholm
2018-03-20 16:12 ` [PATCH v3 16/16] ArmPkg: Introduce SCMI protocol Girish Pathak
2018-03-21 12:54 ` Evan Lloyd
2018-04-23 11:31 ` Leif Lindholm
2018-04-23 16:06 ` Girish Pathak
2018-04-23 16:22 ` Leif Lindholm
2018-04-23 16:49 ` Girish Pathak
2018-04-23 17:11 ` [PATCH v3 00/16] Update GOP Leif Lindholm
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=HE1PR0801MB1771F8F31246524E721940B58BAA0@HE1PR0801MB1771.eurprd08.prod.outlook.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