lkml.org 
[lkml]   [2024]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3] serial: port: Don't suspend if the port is still busy
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



\
 
 \ /
  Last update: 2024-05-27 14:55    [W:0.044 / U:21.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site