lkml.org 
[lkml]   [2022]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 1/6] serial: 8250: make saved LSR larger
On Wed, Jun 15, 2022 at 03:48:24PM +0300, Ilpo Järvinen wrote:
> DW flags address received as BIT(8) in LSR. In order to not lose that
> on read, enlarge lsr_saved_flags to u16.
>
> Adjust lsr/status variables and related call chains to use u16.
> Technically, some of these type conversion would not be needed but it
> doesn't hurt to be consistent.

...

> static void exar_shutdown(struct uart_port *port)
> {
> - unsigned char lsr;
> + u16 lsr;

I would take a chance and move it under the longer line(s), like after xmit
(taking into account given context).

> bool tx_complete = false;
> struct uart_8250_port *up = up_to_u8250p(port);
> struct circ_buf *xmit = &port->state->xmit;

...

> int fsl8250_handle_irq(struct uart_port *port)
> {
> - unsigned char lsr, orig_lsr;
> + u16 lsr, orig_lsr;

Ditto. And so on.

> unsigned long flags;
> unsigned int iir;
> struct uart_8250_port *up = up_to_u8250p(port);

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2022-06-15 16:02    [W:0.034 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site