From: "Jan Beulich" Subject: Re: [PATCH RFC 4/8] ns16550: support DesignWare 8250 Date: Tue, 10 Sep 2013 16:19:07 +0100 Message-ID: <522F548B02000078000F20E0@nat28.tlf.novell.com> References: <1378822681.10928.8.camel@kazak.uk.xensource.com> <1378822705-19310-4-git-send-email-ian.campbell@citrix.com> <522F50B602000078000F2064@nat28.tlf.novell.com> <1378825979.10928.22.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VJPih-0004ul-3a for xen-devel@lists.xenproject.org; Tue, 10 Sep 2013 15:19:11 +0000 In-Reply-To: <1378825979.10928.22.camel@kazak.uk.xensource.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: keir@xen.org, stefano.stabellini@eu.citrix.com, julien.grall@linaro.org, tim@xen.org, Josh Zhao , xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 10.09.13 at 17:12, Ian Campbell wrote: > On Tue, 2013-09-10 at 16:02 +0100, Jan Beulich wrote: >> >>> On 10.09.13 at 16:18, Ian Campbell wrote: >> > @@ -233,6 +234,16 @@ static void ns16550_setup_preirq(struct ns16550 *uart) >> > /* No interrupts. */ >> > ns_write_reg(uart, UART_IER, 0); >> > >> > + if ( uart->dw_usr_bsy && >> > + (ns_read_reg(uart, UART_IIR) & UART_IIR_BSY) == UART_IIR_BSY ) >> > + { >> > + /* DesignWare 8250 detects if LCR is written while the UART is >> > + * busy and raises a "busy detect" interrupt. Read the UART >> > + * Status Register to clear this state. >> > + */ >> > + (void)ns_read_reg(uart, UART_USR); >> >> Pointless cast? > > It's a hint to the compiler/reader that the return value is deliberately > discarded. We have a handful of these in the tree already. And over time I managed to remove another handful... Jan