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=girish.pathak@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 89C92224BBC20 for ; Tue, 20 Mar 2018 09:12:03 -0700 (PDT) Received: from E107875.Emea.Arm.com (e107875.emea.arm.com [10.10.1.104]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id w2KGISRB021595; Tue, 20 Mar 2018 16:18:31 GMT From: Girish Pathak To: edk2-devel@lists.01.org Cc: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org, Matteo.Carlini@arm.com, Stephanie.Hughes-Fitt@arm.com, nd@arm.com, Arvind.Chauhan@arm.com, Daniil.Egranov@arm.com, thomas.abraham@arm.com Date: Tue, 20 Mar 2018 16:18:14 +0000 Message-Id: <20180320161823.54020-9-girish.pathak@arm.com> X-Mailer: git-send-email 2.13.3.windows.1 In-Reply-To: <20180320161823.54020-1-girish.pathak@arm.com> References: <20180320161823.54020-1-girish.pathak@arm.com> Subject: [PATCH edk2-platforms v3 08/17] ARM/VExpressPkg: HdLcdArmVExpressLib: Remove status check EFI_TIMEOUT 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: Tue, 20 Mar 2018 16:12:04 -0000 From: Girish Pathak None of the ArmPlatformSys* functions returns EFI_TIMEOUT. Hence checking this in the do {} while loop in LcdPlatformSetMode is wrong. Therefore remove this comparision and as a result remove the do {} while loop. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Girish Pathak Signed-off-by: Evan Lloyd Reviewed-by: Ard Biesheuvel --- Platform/ARM/VExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c | 22 ++++++++------------ 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/Platform/ARM/VExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c b/Platform/ARM/VExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c index d6d63295688f9aa5a6b24cee142760609439941d..cd62cd61883dcd78c72aa614466c6f714cc73fc4 100644 --- a/Platform/ARM/VExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c +++ b/Platform/ARM/VExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c @@ -230,25 +230,21 @@ LcdPlatformSetMode ( } // Set the video mode oscillator - do { - Status = ArmPlatformSysConfigSetDevice ( - SYS_CFG_OSC_SITE1, - FixedPcdGet32 (PcdHdLcdVideoModeOscId), - mResolutions[ModeNumber].OscFreq - ); - } while (Status == EFI_TIMEOUT); + Status = ArmPlatformSysConfigSetDevice ( + SYS_CFG_OSC_SITE1, + FixedPcdGet32 (PcdHdLcdVideoModeOscId), + mResolutions[ModeNumber].OscFreq + ); if (EFI_ERROR (Status)) { ASSERT_EFI_ERROR (Status); return Status; } // Set the DVI into the new mode - do { - Status = ArmPlatformSysConfigSet ( - SYS_CFG_DVIMODE, - mResolutions[ModeNumber].Mode - ); - } while (Status == EFI_TIMEOUT); + Status = ArmPlatformSysConfigSet ( + SYS_CFG_DVIMODE, + mResolutions[ModeNumber].Mode + ); if (EFI_ERROR (Status)) { ASSERT_EFI_ERROR (Status); return Status; -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'