mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yicong Yang <yangyicong@huawei.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Jiri Slaby <jirislaby@kernel.org>
Cc: <yangyicong@hisilicon.com>, <gregkh@linuxfoundation.org>,
	<tony@atomide.com>, <linux-kernel@vger.kernel.org>,
	<linux-serial@vger.kernel.org>, <john.ogness@linutronix.de>,
	<tglx@linutronix.de>, <linuxarm@huawei.com>,
	<prime.zeng@hisilicon.com>, <jonathan.cameron@huawei.com>,
	<fanghao11@huawei.com>
Subject: Re: [PATCH v3] serial: port: Don't suspend if the port is still busy
Date: Thu, 22 Feb 2024 17:41:58 +0800	[thread overview]
Message-ID: <d6384122-08da-03f4-ba9f-caa893ca10fb@huawei.com> (raw)
In-Reply-To: <ZcUOp60BX8njHQ4Q@smile.fi.intel.com>

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.

      reply	other threads:[~2024-02-22  9:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-08  7:52 Yicong Yang
2024-02-08  8:13 ` Tony Lindgren
2024-02-08  8:27 ` Jiri Slaby
2024-02-08 17:25   ` Andy Shevchenko
2024-02-22  9:41     ` Yicong Yang [this message]

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=d6384122-08da-03f4-ba9f-caa893ca10fb@huawei.com \
    --to=yangyicong@huawei.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=fanghao11@huawei.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=john.ogness@linutronix.de \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=prime.zeng@hisilicon.com \
    --cc=tglx@linutronix.de \
    --cc=tony@atomide.com \
    --cc=yangyicong@hisilicon.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

all inboxes | Powered by JetHome®