qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Cc: mkletzan@redhat.com, peter.maydell@linaro.org, edgari@xilinx.com,
	mjt@tls.msk.ru, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH bugfix v1 1/1] char/serial: Fix emptyness check
Date: Tue, 11 Feb 2014 09:55:29 +0000	[thread overview]
Message-ID: <20140211095528.GA2509@work-vm> (raw)
In-Reply-To: <153a8e98437c7d4b7fc3df2bf375fbc9e0bdb8ef.1392101145.git.peter.crosthwaite@xilinx.com>

* Peter Crosthwaite (peter.crosthwaite@xilinx.com) wrote:
> This was guarding against a full fifo rather than an empty fifo when
> popping. Fix.
> 
> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
> ---

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

I think this brings it back to how it was on the old FIFO code.

> 
>  hw/char/serial.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/char/serial.c b/hw/char/serial.c
> index 27dab7d..6d3b5af 100644
> --- a/hw/char/serial.c
> +++ b/hw/char/serial.c
> @@ -225,7 +225,7 @@ static gboolean serial_xmit(GIOChannel *chan, GIOCondition cond, void *opaque)
>  
>      if (s->tsr_retry <= 0) {
>          if (s->fcr & UART_FCR_FE) {
> -            s->tsr = fifo8_is_full(&s->xmit_fifo) ?
> +            s->tsr = fifo8_is_empty(&s->xmit_fifo) ?
>                          0 : fifo8_pop(&s->xmit_fifo);
>              if (!s->xmit_fifo.num) {
>                  s->lsr |= UART_LSR_THRE;
> -- 
> 1.8.5.4
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

  reply	other threads:[~2014-02-11  9:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-11  6:49 [Qemu-devel] [PATCH bugfix v1 1/1] char/serial: Fix emptyness check Peter Crosthwaite
2014-02-11  9:55 ` Dr. David Alan Gilbert [this message]
2014-02-11 12:38   ` [Qemu-devel] [PATCH bugfix v1 1/1] char/serial: Fix emptynesscheckk Alex Bennée
2014-02-11 12:41     ` Dr. David Alan Gilbert
2014-02-11 10:25 ` [Qemu-devel] [PATCH bugfix v1 1/1] char/serial: Fix emptyness check Martin Kletzander
2014-02-11 10:29 ` Michael Tokarev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140211095528.GA2509@work-vm \
    --to=dgilbert@redhat.com \
    --cc=edgari@xilinx.com \
    --cc=mjt@tls.msk.ru \
    --cc=mkletzan@redhat.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).