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 <alexei.fedorov@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
This commit is contained in:
Alexei 2016-09-21 21:33:15 +01:00 committed by Leif Lindholm
parent 2d52a3a237
commit a4bcf0bcdd
1 changed files with 1 additions and 1 deletions

View File

@ -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);