Message ID | 1371651629-31262-1-git-send-email-edgar.iglesias@gmail.com |
---|---|
State | New |
Headers | show |
On Thu, Jun 20, 2013 at 12:20 AM, <edgar.iglesias@gmail.com> wrote: > From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com> > > Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Thanks! Regards, Peter > --- > > v1 -> v2: > Remove loop around qemu_chr_fe_write_all, it does not return short writes. > > hw/char/cadence_uart.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/hw/char/cadence_uart.c b/hw/char/cadence_uart.c > index c2a7834..205e125 100644 > --- a/hw/char/cadence_uart.c > +++ b/hw/char/cadence_uart.c > @@ -297,9 +297,7 @@ static void uart_write_tx_fifo(UartState *s, const uint8_t *buf, int size) > return; > } > > - while (size) { > - size -= qemu_chr_fe_write(s->chr, buf, size); > - } > + qemu_chr_fe_write_all(s->chr, buf, size); > } > > static void uart_receive(void *opaque, const uint8_t *buf, int size) > -- > 1.7.10.4 > >
diff --git a/hw/char/cadence_uart.c b/hw/char/cadence_uart.c index c2a7834..205e125 100644 --- a/hw/char/cadence_uart.c +++ b/hw/char/cadence_uart.c @@ -297,9 +297,7 @@ static void uart_write_tx_fifo(UartState *s, const uint8_t *buf, int size) return; } - while (size) { - size -= qemu_chr_fe_write(s->chr, buf, size); - } + qemu_chr_fe_write_all(s->chr, buf, size); } static void uart_receive(void *opaque, const uint8_t *buf, int size)