Re: btusb autosuspend and circular lock dep

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

 



Am Montag, 24. August 2009 12:16:15 schrieb Marcel Holtmann:> > +skip_waking:> >       usb_anchor_urb(urb, &data->tx_anchor);> >  > >       err = usb_submit_urb(urb, GFP_ATOMIC);> > @@ -646,10 +723,13 @@ static int btusb_send_frame(struct sk_buff *skb)> >               BT_ERR("%s urb %p submission failed", hdev->name, urb);> >               kfree(urb->setup_packet);> >               usb_unanchor_urb(urb);> > +     } else {> > +             usb_mark_last_busy(data->udev);> >       }> >  > >       usb_free_urb(urb);> >  > > +out:> >       return err;> >  }>> Please call the labels simply skip and done.
In this particular case skip_waking seems to be clearer because ittells you right away what is skipped.
> > @@ -721,8 +801,19 @@ static void btusb_work(struct work_struct *work)> >  {> >       struct btusb_data *data = container_of(work, struct btusb_data,> > work); struct hci_dev *hdev = data->hdev;> > +     int err;> >  > >       if (hdev->conn_hash.sco_num > 0) {> > +             if (!data->did_iso_resume) {> > +                     err = usb_autopm_get_interface(data->isoc);> > +                     if (!err) {> > +                             data->did_iso_resume = 1;> > +                     } else {> > +                             clear_bit(BTUSB_ISOC_RUNNING,> > &data->flags);> > +                             usb_kill_anchored_urbs(&data->isoc_anchor);> > +                             return;> > +                     }>> Having this as like this is simpler to read:>>                 if (err < 0) {>                         clear_bit(BTUSB_ISOC_RUNNING, &data->flags);>                         usb_kill_anchored_urbs(&data->isoc_anchor);>                         return;>                 }>>                 data->did_iso_resume = 1;
Do you generally prefer the "else" branch implicit?
The rest is done.
	Regards		Oliver
ÿôèº{.nÇ+?·?®?­?+%?Ëÿ±éݶ¥?wÿº{.nÇ+?·¥?{±ý¹nzÚ(¶â?Ø^n?r¡öŠzË?ëh?šè­Ú&£ûàz¿äz¹Þ?ú+?Ê+zf£¢·h??§~?­?Ûiÿÿï?êÿ?êçz_è®æj:+v?šþ)ߣøm


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux