public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: linux-serial@vger.kernel.org,
	"Greg KH" <gregkh@linuxfoundation.org>,
	"Jiri Slaby" <jirislaby@kernel.org>,
	"Paul Cercueil" <paul@crapouillou.net>,
	linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org,
	"Lukas Wunner" <lukas@wunner.de>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Lino Sanfilippo" <LinoSanfilippo@gmx.de>
Subject: Re: [PATCH v7 1/6] serial: 8250: make saved LSR larger
Date: Wed, 15 Jun 2022 17:00:48 +0300	[thread overview]
Message-ID: <YqnmEGLLKrlR37HE@smile.fi.intel.com> (raw)
In-Reply-To: <20220615124829.34516-2-ilpo.jarvinen@linux.intel.com>

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



  reply	other threads:[~2022-06-15 14:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220615124829.34516-1-ilpo.jarvinen@linux.intel.com>
2022-06-15 12:48 ` [PATCH v7 1/6] serial: 8250: make saved LSR larger Ilpo Järvinen
2022-06-15 14:00   ` Andy Shevchenko [this message]
2022-06-15 12:48 ` [PATCH v7 2/6] serial: 8250: create lsr_save_mask Ilpo Järvinen
2022-06-15 14:01   ` Andy Shevchenko
2022-06-15 12:48 ` [PATCH v7 3/6] serial: 8250_lpss: Use 32-bit reads Ilpo Järvinen
2022-06-15 12:48 ` [PATCH v7 4/6] serial: take termios_rwsem for .rs485_config() & pass termios as param Ilpo Järvinen
2022-06-15 14:05   ` Andy Shevchenko
2022-06-16  5:15     ` Ilpo Järvinen
2022-06-15 12:48 ` [PATCH v7 5/6] serial: Support for RS-485 multipoint addresses Ilpo Järvinen
2022-06-15 14:13   ` Andy Shevchenko
2022-06-16  5:04     ` Ilpo Järvinen
2022-06-16  5:48       ` Jiri Slaby
2022-06-16  7:53         ` Ilpo Järvinen
2022-06-15 12:48 ` [PATCH v7 6/6] serial: 8250_dwlib: Support for 9th bit multipoint addressing Ilpo Järvinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YqnmEGLLKrlR37HE@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=LinoSanfilippo@gmx.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=paul@crapouillou.net \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox