lkml.org 
[lkml]   [2014]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Re: [PATCH] USB: serial: add nt124 usb to serial driver
From
Date

Johan Hovold <johan@kernel.org> wrote:
> On Mon, Dec 08, 2014 at 05:24:17PM -0600, George McCollister wrote:

> > + newline.bParityType = termios->c_cflag & PARENB ?
> > + (termios->c_cflag & PARODD ? 1 : 2) +
> > + (termios->c_cflag & CMSPAR ? 2 : 0) : 0;
>
> This hardly readable. Don't use ?:
>

There's also C_PARENB(tty), C_PARODD(tty), and C_CMSPAR(tty) macros
available, in addition to the others that Johan pointed out.

Sincerely,
Karl P
\
 
 \ /
  Last update: 2014-12-11 10:41    [W:0.090 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site