From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36175) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFjps-0008I1-6u for qemu-devel@nongnu.org; Wed, 22 Jun 2016 11:13:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFjpm-0000Bu-71 for qemu-devel@nongnu.org; Wed, 22 Jun 2016 11:12:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59737) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFjpm-0000Bo-16 for qemu-devel@nongnu.org; Wed, 22 Jun 2016 11:12:54 -0400 Date: Wed, 22 Jun 2016 16:12:50 +0100 From: "Dr. David Alan Gilbert" Message-ID: <20160622151249.GE6604@work-vm> References: <1466432945-28682-1-git-send-email-pbonzini@redhat.com> <1466432945-28682-5-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1466432945-28682-5-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH 4/6] serial: simplify tsr_retry reset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, bcketchum@gmail.com * Paolo Bonzini (pbonzini@redhat.com) wrote: > Move common code outside the if, and reset tsr_retry even in loopback mode. > Right now it cannot become non-zero, but it will be possible as soon as > we start respecting the baud rate. > > Signed-off-by: Paolo Bonzini Reviewed-by: Dr. David Alan Gilbert > --- > hw/char/serial.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/hw/char/serial.c b/hw/char/serial.c > index 4196a2e..d232473 100644 > --- a/hw/char/serial.c > +++ b/hw/char/serial.c > @@ -265,10 +265,8 @@ static void serial_xmit(SerialState *s) > s->tsr_retry++; > return; > } > - s->tsr_retry = 0; > - } else { > - s->tsr_retry = 0; > } > + s->tsr_retry = 0; > > /* Transmit another byte if it is already available. It is only > possible when FIFO is enabled and not empty. */ > -- > 2.5.5 > > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK