Linux Serial subsystem development
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Michael Pratt <mcpratt@pm.me>
Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Jiri Slaby" <jirislaby@kernel.org>,
	"Wander Lairson Costa" <wander@redhat.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Vamshi Gajjela" <vamshigajjela@google.com>
Subject: Re: [PATCH v2 2/3] serial: 8250: Store whether fifo device is enabled
Date: Tue, 16 Apr 2024 22:18:31 +0300	[thread overview]
Message-ID: <Zh7PBwJ_r2OzES1y@smile.fi.intel.com> (raw)
In-Reply-To: <TYV02sftzpleM60PqVjM3niI3BqS03AyOPPAg0urAoBKyhgGGQyq1OSkZQM8aZ70Q-KaT7-lYiHl9xH-wjcdsMNvKPiJZDsvwC1uN5uEn7E=@pm.me>

On Tue, Apr 16, 2024 at 07:09:52PM +0000, Michael Pratt wrote:
> On Tuesday, April 16th, 2024 at 14:55, Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> > > @@ -3392,6 +3392,8 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s,
> > 
> > > + up->fifo_enable = use_fifo;
> > 
> > This seems incorrect / not the only one place to assign this. What if the
> > console not enabled at compile time? What if it's not enabled at boot time?
> 
> This is 8250 specific, and currently, it's the only place there
> where it's decided whether or not to use the fifo device
> by checking a bunch of flags and values.

Exactly, as initial commit is related to the kernel console _only_.
While your code, IIUC (correct me, if I'm wrong) is for any use of the port.

> If you're suggesting that these checks are moved out of this function somewhere else,
> I would probably agree with that, but let's save that idea for the future...

Not really (again, IIUC above), as console can be not enabled, and hence
serial8250_console_write() never been called and you will have false impression
that there is no FIFO in use.

> If you're suggesting that there could be a null pointer, I don't think that's possible
> in this function... (the name of the pointer being "up" might be confusing?)
> 
> Sorry if I'm misunderstanding what you mean.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2024-04-16 19:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-16 18:28 [PATCH v2 0/3] serial: 8250: Set fifo timeout with uart_fifo_timeout() Michael Pratt
2024-04-16 18:29 ` [PATCH v2 1/3] serial: core: Store fifo timeout again Michael Pratt
2024-04-16 18:58   ` Andy Shevchenko
2024-04-16 19:20     ` Michael Pratt
2024-04-17  8:18       ` Ilpo Järvinen
2024-04-17 15:41       ` Wander Lairson Costa
2024-04-17  7:52   ` Ilpo Järvinen
2024-04-16 18:29 ` [PATCH v2 2/3] serial: 8250: Store whether fifo device is enabled Michael Pratt
2024-04-16 18:55   ` Andy Shevchenko
2024-04-16 19:09     ` Michael Pratt
2024-04-16 19:18       ` Andy Shevchenko [this message]
2024-04-16 19:40         ` Michael Pratt
2024-04-16 18:34 ` [PATCH v2 3/3] serial: 8250: Set fifo timeout using uart_fifo_timeout() Michael Pratt
2024-04-16 18:57   ` Andy Shevchenko
2024-04-16 19:15     ` Michael Pratt
2024-04-17  8:13       ` Ilpo Järvinen
2024-04-17  8:00   ` 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=Zh7PBwJ_r2OzES1y@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=mcpratt@pm.me \
    --cc=vamshigajjela@google.com \
    --cc=wander@redhat.com \
    /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