diff options
author | Mario Six <mario.six@gdsys.cc> | 2018-01-15 13:09:49 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-01-28 17:36:28 +0300 |
commit | 4dbf9bed187b366ece04e6e15fd2cc918270f815 (patch) | |
tree | 551e4c6a0aae90ce5c678406d95920d83c618d3b /drivers/serial | |
parent | 7ba50418b9dc2f20e8f76857afdc85b48d49c53a (diff) | |
download | u-boot-4dbf9bed187b366ece04e6e15fd2cc918270f815.tar.xz |
serial: ns16550: Fix style violation
Clarify the computation precedence in two ternary operator
constructions.
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mario Six <mario.six@gdsys.cc>
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/ns16550.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c index c702304e79..6f9ce689cf 100644 --- a/drivers/serial/ns16550.c +++ b/drivers/serial/ns16550.c @@ -339,9 +339,9 @@ static int ns16550_serial_pending(struct udevice *dev, bool input) struct NS16550 *const com_port = dev_get_priv(dev); if (input) - return serial_in(&com_port->lsr) & UART_LSR_DR ? 1 : 0; + return (serial_in(&com_port->lsr) & UART_LSR_DR) ? 1 : 0; else - return serial_in(&com_port->lsr) & UART_LSR_THRE ? 0 : 1; + return (serial_in(&com_port->lsr) & UART_LSR_THRE) ? 0 : 1; } static int ns16550_serial_getc(struct udevice *dev) |