On Sun, Apr 28, 2002, Olaf Hering <[EMAIL PROTECTED]> wrote:
> On Mon, Apr 08, Greg KH wrote:
> > # This is a BitKeeper generated patch for the following project:
> > # Project Name: Linux kernel tree
> > # This patch format is intended for GNU patch command version 2.5 or higher.
> > # This patch includes the following deltas:
> > # ChangeSet 1.389 -> 1.390
> > # drivers/usb/uhci.h 1.8 -> 1.9
> > # drivers/usb/uhci.c 1.25 -> 1.26
> > #
> > # The following is the BitKeeper ChangeSet Log
> > # --------------------------------------------
> > # 02/04/08 [EMAIL PROTECTED] 1.390
> > # [PATCH] uhci.c 2.4.19-pre6 cleanup
> > #
> > # This patch merely cleans up the code a little and doesn't fix any bugs.
> > # It makes a couple of code paths a bit easier to understand, removes an
> > # unused variable (uhci_list) and some procfs variables when not using
> > # procfs.
> > # --------------------------------------------
> > #
> > diff -Nru a/drivers/usb/uhci.c b/drivers/usb/uhci.c
> > --- a/drivers/usb/uhci.c Mon Apr 8 09:45:40 2002
> > +++ b/drivers/usb/uhci.c Mon Apr 8 09:45:40 2002
> > @@ -1622,8 +1622,7 @@
> >
> > if (urb->status != -EINPROGRESS) {
> > info("uhci_transfer_result: called for URB %p not in flight?", urb);
> > - spin_unlock_irqrestore(&urb->lock, flags);
> > - return;
> > + goto out;
> > }
> >
> > switch (usb_pipetype(urb->pipe)) {
>
> I have two questions about this hunk:
> - is this a safe code path?
>
> ....
> /* Remove it from uhci->urb_list */
> list_del_init(&urb->urb_list);
> out_complete:
> uhci_add_complete(urb);
> out:
> spin_unlock_irqrestore(&urb->lock, flags);
> }
>
> The last two lines appear in this patch.
>
>
> - I get errors when I make this a #if 0:
>
> if (urb->status != -EINPROGRESS) {
> info("uhci_transfer_result: called for URB %p not in flight?", urb);
> #if 1
> spin_unlock_irqrestore(&urb->lock, flags);
> return;
> #endif
> goto out;
> }
Are you absolutely sure? That code block should never get called. It's
solely there to detect errors. I don't even see the message in your
dmesg output.
Not only that, but you can see that the code is exactly the same.
The only thing that I could think of would be gcc miscompiling the code.
What version of gcc are you using?
FWIW, there is no change in behaviour with that code snipped applied.
JE
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel