Re: [PATCH tty v3 6/6] serial: 8250: Add support for console flow control

John Ogness
2026-04-20T09:57:52Z

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