[edk2] [PATCH edk2-platforms v4 08/17] ARM/VExpressPkg: HdLcdArmVExpressLib: Remove status check EFI_TIMEOUT

Girish Pathak posted 17 patches 6 years, 6 months ago
[edk2] [PATCH edk2-platforms v4 08/17] ARM/VExpressPkg: HdLcdArmVExpressLib: Remove status check EFI_TIMEOUT
Posted by Girish Pathak 6 years, 6 months ago
From: Girish Pathak <girish.pathak at arm.com>

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 <girish.pathak@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 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)'


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel