* [U-Boot] [RESEND PATCH v2 2/4] serial: ns16550: Fix style violation
@ 2018-01-15 10:09 Mario Six
2018-01-28 18:52 ` [U-Boot] [U-Boot, RESEND, v2, " Tom Rini
0 siblings, 1 reply; 2+ messages in thread
From: Mario Six @ 2018-01-15 10:09 UTC (permalink / raw)
To: u-boot
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>
---
v1 -> v2:
None
---
drivers/serial/ns16550.c | 4 ++--
1 file 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)
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [U-Boot, RESEND, v2, 2/4] serial: ns16550: Fix style violation
2018-01-15 10:09 [U-Boot] [RESEND PATCH v2 2/4] serial: ns16550: Fix style violation Mario Six
@ 2018-01-28 18:52 ` Tom Rini
0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2018-01-28 18:52 UTC (permalink / raw)
To: u-boot
On Mon, Jan 15, 2018 at 11:09:49AM +0100, Mario Six wrote:
> 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>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180128/920ac6e7/attachment.sig>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-28 18:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-15 10:09 [U-Boot] [RESEND PATCH v2 2/4] serial: ns16550: Fix style violation Mario Six
2018-01-28 18:52 ` [U-Boot] [U-Boot, RESEND, v2, " Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.