Re: [bug report] usb: gadget: u_serial: process RX in workqueue instead of tasklet

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

 



On Mon, Jun 24, 2019 at 03:41:54PM +0200, mirq-linux@xxxxxxxxxxxx wrote:
> On Mon, Jun 24, 2019 at 03:32:58PM +0300, Dan Carpenter wrote:
> > Hello Michał Mirosław,
> > 
> > This is a semi-automatic email about new static checker warnings.
> > 
> > The patch 8b4c62aef6f6: "usb: gadget: u_serial: process RX in
> > workqueue instead of tasklet" from Dec 16, 2018, leads to the
> > following Smatch complaint:
> [...] 
> >    431		/* We want our data queue to become empty ASAP, keeping data
> >    432		 * in the tty and ldisc (not here).  If we couldn't push any
> >    433		 * this time around, RX may be starved, so wait until next jiffy.
> >    434		 *
> >    435		 * We may leave non-empty queue only when there is a tty, and
> >    436		 * either it is throttled or there is no more room in flip buffer.
> >    437		 */
> >    438		if (!list_empty(queue) && !tty_throttled(tty))
> >                                           ^^^^^^^^^^^^^^^^^^^
> > in the original code there was check for NULL here but the patch removed
> > it.
> > 
> >    439			schedule_delayed_work(&port->push, 1);
> >    440	
> 
> Hi Dan,
> 
> The code is correct and explained in the comment above it - while() loop
> above can be exited before emptying the queue only when tty != NULL.
> 


:(  Sorry...  Smatch isn't supposed to generate those warnings.  I don't
know exactly what happened.  I thought it was because of some recent
code changes I had made but now I think it it's because my build system
had a disk failure...  Anyway, I can't reproduce the warning any more.

Thanks for looking at this.

regards,
dan carpenter




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux