Re: [PATCH v3] serial: port: Don't suspend if the port is still busy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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






[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux