Re: [PATCH tty v3 6/6] serial: 8250: Add support for console flow control
From: John Ogness
Date: Mon Apr 20 2026 - 05:58:03 EST
On 2026-04-20, Andy Shevchenko <andy.shevchenko@xxxxxxxxx> 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