public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: John Ogness <john.ogness@linutronix.de>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Jiri Slaby" <jirislaby@kernel.org>,
	linux-kernel@vger.kernel.org,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Ingo Molnar" <mingo@kernel.org>,
	"Osama Abdelkader" <osama.abdelkader@gmail.com>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski@oss.qualcomm.com>,
	"Gerhard Engleder" <eg@keba.com>,
	"Lukas Wunner" <lukas@wunner.de>,
	"Dr. David Alan Gilbert" <linux@treblig.org>,
	"Joseph Tilahun" <jtilahun@astranis.com>,
	linux-serial@vger.kernel.org
Subject: Re: [PATCH tty v3 6/6] serial: 8250: Add support for console flow control
Date: Mon, 20 Apr 2026 12:03:49 +0206	[thread overview]
Message-ID: <87jyu20x9e.fsf@jogness.linutronix.de> (raw)
In-Reply-To: <CAHp75Vf4YZVqXa7eH-RFeVsycdzoHijcWFnUbGv2PSmtPya1-w@mail.gmail.com>

On 2026-04-20, Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
>>         struct uart_8250_port *uart;
>> +       bool cons_flow;
>
>> +       /* Preserve specified console flow control. */
>> +       cons_flow = uart_get_cons_flow(&uart->port);
>
> Sorry for nit-picking, but when I see 'bool' and see a getter, I got
> confused.

Understandable. Right now the wrappers are a bit overkill since it is
just a single boolean and there are no locking constraints.

> I would rather see getter/setter to be something like
>
>     cons_flow = uart_is_cons_flow_enabled(&uart->port);
>     uart_enable_cons_flow(&uart->port);
>     uart_disable_cons_flow(&uart->port);

I will use your suggested API for v4 unless someone makes a case for a
different API (or just direct accessing with no wrappers).

Note that this comment actually applies to patch 1 of the series.

John

  reply	other threads:[~2026-04-20  9:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-17 10:24 [PATCH tty v3 0/6] 8250: Add console flow control John Ogness
2026-04-17 10:24 ` [PATCH tty v3 1/6] serial: core: Add dedicated uart_port field for console flow John Ogness
2026-04-17 13:15   ` John Ogness
2026-04-17 10:24 ` [PATCH tty v3 2/6] serial: Replace driver usage of UPF_CONS_FLOW John Ogness
2026-04-17 10:24 ` [PATCH tty v3 3/6] serial: sh-sci: Avoid deprecated UPF_CONS_FLOW John Ogness
2026-04-17 10:24 ` [PATCH tty v3 4/6] serial: 8250: Set cons_flow on port registration John Ogness
2026-04-17 10:24 ` [PATCH tty v3 5/6] serial: 8250: Check LSR timeout on console flow control John Ogness
2026-04-17 10:24 ` [PATCH tty v3 6/6] serial: 8250: Add support for " John Ogness
2026-04-20  9:12   ` Andy Shevchenko
2026-04-20  9:57     ` John Ogness [this message]
2026-04-20 10:16       ` Andy Shevchenko

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=87jyu20x9e.fsf@jogness.linutronix.de \
    --to=john.ogness@linutronix.de \
    --cc=andy.shevchenko@gmail.com \
    --cc=eg@keba.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jirislaby@kernel.org \
    --cc=jtilahun@astranis.com \
    --cc=krzysztof.kozlowski@oss.qualcomm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux@treblig.org \
    --cc=lukas@wunner.de \
    --cc=mingo@kernel.org \
    --cc=osama.abdelkader@gmail.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