Re: [PATCH v5 09/14] serial: liteuart: fix rx loop variable types

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22. 11. 22, 22:05, Gabriel L. Somlo wrote:
So, looking at what uart_insert_char() does, I could simply do this
instead:

  	while(!litex_read8(membase + OFF_RXEMPTY) {
  		...
		/* LiteUART does not provide overrun bits */
  		if (!(uart_handle_sysrq_char(port, ch) ||
  		     tty_insert_flip_char(&port->state->port, ch, TTY_NORMAL)))
  			++port->icount.buf_overrun;
That is, `tty_insert_flip_char() is the portion of `uart_insert_char()`
that actually gets executed if status is 1 and overrun is 0...

I'm not quite confident about whether this is an improvement in legibility
and/or code quality,

It's not :). Keep the uart_ helper.

--
js
suse labs




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux