Re: [PATCH V6 03/10] USB: f81232: implement RX bulk-in ep

2015-02-17 Thread 'Greg KH'
On Tue, Feb 17, 2015 at 10:06:07AM +, David Laight wrote: > From: Greg KH > > > + for (i = 0 ; i < urb->actual_length ; i += 2) { > > > + tty_flag = TTY_NORMAL; > > > + > > > + if (unlikely(data[i+0] & UART_LSR_BRK_ERROR_BITS)) { > > > > Never use unlikely() unless you can

RE: [PATCH V6 03/10] USB: f81232: implement RX bulk-in ep

2015-02-17 Thread David Laight
From: Greg KH > > + for (i = 0 ; i < urb->actual_length ; i += 2) { > > + tty_flag = TTY_NORMAL; > > + > > + if (unlikely(data[i+0] & UART_LSR_BRK_ERROR_BITS)) { > > Never use unlikely() unless you can prove that it actually matters if > you use it. Hint, it's almost

Re: [PATCH V6 03/10] USB: f81232: implement RX bulk-in ep

2015-02-17 Thread 'Greg KH'
On Tue, Feb 17, 2015 at 10:06:07AM +, David Laight wrote: From: Greg KH + for (i = 0 ; i urb-actual_length ; i += 2) { + tty_flag = TTY_NORMAL; + + if (unlikely(data[i+0] UART_LSR_BRK_ERROR_BITS)) { Never use unlikely() unless you can prove that it actually

RE: [PATCH V6 03/10] USB: f81232: implement RX bulk-in ep

2015-02-17 Thread David Laight
From: Greg KH + for (i = 0 ; i urb-actual_length ; i += 2) { + tty_flag = TTY_NORMAL; + + if (unlikely(data[i+0] UART_LSR_BRK_ERROR_BITS)) { Never use unlikely() unless you can prove that it actually matters if you use it. Hint, it's almost impossible to prove,

Re: [PATCH V6 03/10] USB: f81232: implement RX bulk-in ep

2015-02-16 Thread Peter Hung
Hello, Greg KH 於 2015/2/17 上午 03:41 寫道: + if (unlikely(data[i+0] & UART_LSR_BRK_ERROR_BITS)) { Never use unlikely() unless you can prove that it actually matters if you use it. Hint, it's almost impossible to prove, so don't use it, the compiler and processor look-ahead is

Re: [PATCH V6 03/10] USB: f81232: implement RX bulk-in ep

2015-02-16 Thread Greg KH
On Mon, Feb 16, 2015 at 03:57:55PM +0800, Peter Hung wrote: > The F81232 bulk-in is RX data + LSR channel, data format is > [LSR+Data][LSR+Data]. , We had reimplemented in this patch. > > Signed-off-by: Peter Hung > --- > drivers/usb/serial/f81232.c | 68 >

Re: [PATCH V6 03/10] USB: f81232: implement RX bulk-in ep

2015-02-16 Thread Greg KH
On Mon, Feb 16, 2015 at 03:57:55PM +0800, Peter Hung wrote: The F81232 bulk-in is RX data + LSR channel, data format is [LSR+Data][LSR+Data]. , We had reimplemented in this patch. Signed-off-by: Peter Hung hpeter+linux_ker...@gmail.com --- drivers/usb/serial/f81232.c | 68

Re: [PATCH V6 03/10] USB: f81232: implement RX bulk-in ep

2015-02-16 Thread Peter Hung
Hello, Greg KH 於 2015/2/17 上午 03:41 寫道: + if (unlikely(data[i+0] UART_LSR_BRK_ERROR_BITS)) { Never use unlikely() unless you can prove that it actually matters if you use it. Hint, it's almost impossible to prove, so don't use it, the compiler and processor look-ahead is