From a4bcf0bcdd81285e2ae881db7a51a454f8ab0951 Mon Sep 17 00:00:00 2001 From: Alexei Date: Wed, 21 Sep 2016 21:33:15 +0100 Subject: ArmPlatformPkg: Remove UINTN cast when setting BaudRate. SerialPortInitialize() set the BaudRate variable (type UINT64) as: BaudRate = (UINTN)FixedPcdGet64 (PcdUartDefaultBaudRate); This commit fixes a potential problem on ARM 32-bit builds, where the UINTN type is defined as UINT32, by removing the cast: BaudRate = FixedPcdGet64 (PcdUartDefaultBaudRate); Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Alexei Fedorov Signed-off-by: Evan Lloyd Reviewed-by: Leif Lindholm --- ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ArmPlatformPkg/Library') diff --git a/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.c b/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.c index 5dce852d90..571d0618c3 100644 --- a/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.c +++ b/ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortLib.c @@ -41,7 +41,7 @@ SerialPortInitialize ( UINT8 DataBits; EFI_STOP_BITS_TYPE StopBits; - BaudRate = (UINTN)FixedPcdGet64 (PcdUartDefaultBaudRate); + BaudRate = FixedPcdGet64 (PcdUartDefaultBaudRate); ReceiveFifoDepth = 0; // Use default FIFO depth Parity = (EFI_PARITY_TYPE)FixedPcdGet8 (PcdUartDefaultParity); DataBits = FixedPcdGet8 (PcdUartDefaultDataBits); -- cgit v1.2.3