diff --git a/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c b/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c index f1015b1fce..3c58a0f39a 100644 --- a/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c +++ b/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c @@ -2,7 +2,7 @@ Serial I/O Port library functions with no library constructor/destructor Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.
- Copyright (c) 2011 - 2016, ARM Ltd. All rights reserved.
+ Copyright (c) 2011 - 2020, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -269,31 +269,31 @@ PL011UartSetControl ( { UINT32 Bits; - if (Control & (mInvalidControlBits)) { + if ((Control & mInvalidControlBits) != 0) { return RETURN_UNSUPPORTED; } Bits = MmioRead32 (UartBase + UARTCR); - if (Control & EFI_SERIAL_REQUEST_TO_SEND) { + if ((Control & EFI_SERIAL_REQUEST_TO_SEND) != 0) { Bits |= PL011_UARTCR_RTS; } else { Bits &= ~PL011_UARTCR_RTS; } - if (Control & EFI_SERIAL_DATA_TERMINAL_READY) { + if ((Control & EFI_SERIAL_DATA_TERMINAL_READY) != 0) { Bits |= PL011_UARTCR_DTR; } else { Bits &= ~PL011_UARTCR_DTR; } - if (Control & EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE) { + if ((Control & EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE) != 0) { Bits |= PL011_UARTCR_LBE; } else { Bits &= ~PL011_UARTCR_LBE; } - if (Control & EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE) { + if ((Control & EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE) != 0) { Bits |= (PL011_UARTCR_CTSEN | PL011_UARTCR_RTSEN); } else { Bits &= ~(PL011_UARTCR_CTSEN | PL011_UARTCR_RTSEN);