Re: btusb autosuspend and circular lock dep

Marcel Holtmann
2009-08-24T19:59:22Z

Hi Oliver,

> > > > > > I see. I removed that case and re-tested. The simple down, auto,
> > > > > > up, down test worked fine. However, the down, up, wait, auto test
> > > > > > failed. Logs of the success and the failure are attached.
> > > > >
> > > > > Very well, this version works for me.
> > > >
> > > > can you send a clean version so we can merge this into 2.6.32. This
> > > > version still has the debug details in there. And please send it to the
> > > > mailing list for reference.
>
> And again.
>
> > > + if (!err < 0)
> > > + return;
> >
> > This looks like a typo.
>
> Fixed
> >
>
> > > @@ -989,9 +1123,10 @@ static int btusb_resume(struct usb_interface *intf)
> > > err = btusb_submit_bulk_urb(hdev, GFP_NOIO);
> > > if (err < 0) {
> > > clear_bit(BTUSB_BULK_RUNNING, &data->flags);
> > > - return err;
> > > - } else
> > > + goto failed;
> > > + } else {
> > > btusb_submit_bulk_urb(hdev, GFP_NOIO);
> > > + }
> > > }
> >
> > Normally we don't put braces around single else or if statement.
>
> Quoting CodingStyle.txt:
> This does not apply if one branch of a conditional statement is a single
> statement. Use braces in both branches.
>
> if (condition) {
> do_this();
> do_that();
> } else {
> otherwise();
> }

okay, then we have to violate coding style here since throughout the
whole Bluetooth subsystem we don't do { } around single statements. And
this applies to single else statements.

Regards

Marcel