mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Jiri Slaby <jirislaby@kernel.org>
Cc: Yicong Yang <yangyicong@huawei.com>,
	gregkh@linuxfoundation.org, tony@atomide.com,
	linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
	john.ogness@linutronix.de, tglx@linutronix.de,
	yangyicong@hisilicon.com, 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, 8 Feb 2024 19:25:59 +0200	[thread overview]
Message-ID: <ZcUOp60BX8njHQ4Q@smile.fi.intel.com> (raw)
In-Reply-To: <beb599e2-ebc5-4b26-82c3-908830effd5a@kernel.org>

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.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2024-02-08 17:26 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 [this message]
2024-02-22  9:41     ` Yicong Yang

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=ZcUOp60BX8njHQ4Q@smile.fi.intel.com \
    --to=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 \
    --cc=yangyicong@huawei.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®