Re: [PATCH] serial: uart: add hw flow control support configuration

From: Greg Kroah-Hartman
Date: Thu Apr 24 2014 - 19:27:48 EST


On Wed, Apr 23, 2014 at 03:27:17PM +0100, One Thousand Gnomes wrote:
> > >- if (up->capabilities & UART_CAP_AFE && port->fifosize >= 32) {
> > >+ if ((up->capabilities & UART_CAP_AFE && (port->fifosize >= 32)) ||
> > >+ port->flags & UPF_HARD_FLOW) {
> >
> > [Alan] Surely you want brackets on the port->flags & UPF_HARD_FLOW ??
> >
> > The C precedence table shows following order:=
> > -> & ||
> >
> > So flags will be accessed first and then AND-ed with UPF_HARD_FLOW and
> > result will be OR-ed with left side expression value. So no need for bracket IMO.
>
> Yep... agreed.

Perhaps, but please put them there so we all _know_ what it is doing is
correct.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/