[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d6384122-08da-03f4-ba9f-caa893ca10fb@huawei.com>
Date: Thu, 22 Feb 2024 17:41:58 +0800
From: Yicong Yang <yangyicong@...wei.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, Jiri Slaby
<jirislaby@...nel.org>
CC: <yangyicong@...ilicon.com>, <gregkh@...uxfoundation.org>,
<tony@...mide.com>, <linux-kernel@...r.kernel.org>,
<linux-serial@...r.kernel.org>, <john.ogness@...utronix.de>,
<tglx@...utronix.de>, <linuxarm@...wei.com>, <prime.zeng@...ilicon.com>,
<jonathan.cameron@...wei.com>, <fanghao11@...wei.com>
Subject: Re: [PATCH v3] serial: port: Don't suspend if the port is still busy
On 2024/2/9 1:25, Andy Shevchenko wrote:
> On Thu, Feb 08, 2024 at 09:27:57AM +0100, Jiri Slaby wrote:
>> On 08. 02. 24, 8:52, Yicong Yang wrote:
>
> ...
>
>>> static int __serial_port_busy(struct uart_port *port)
>>> {
>>> - return !uart_tx_stopped(port) &&
>>> - uart_circ_chars_pending(&port->state->xmit);
>>> + if (uart_tx_stopped(port))
>>> + return 0;
>>> +
>>> + if (uart_circ_chars_pending(&port->state->xmit))
>>> + return -EBUSY;
>>
>> Why do you do this change at all? If anything, __serial_port_busy() should
>> be made to return a bool and not to return an error. Look how it is named --
>> returning EBUSY is sort of unexpected in my eyes. And if this needed to be
>> done, it should have been in a separate patch anyway.
>
> I proposed that with a renaming, so it won't look as boolean.
> And I also implied (sorry if it was unclear) that this has to be
> done separately, so we are on the same page about this.
>
Seems I misunderstand the comment from Andy. Will drop this change which should be
a separate one besides the fix. Will respin a v4 which only narrow the lock region
based on v2 (per Andy).
Thanks.
Powered by blists - more mailing lists