Am Sonntag, 12. Januar 2003 14:58 schrieb Wolfgang Mües:
> Hello,
>
> this is the updated auerswald driver on top of 2.4.20. Does anybody wants
> to have a look at it for review? I am very shure I have missed something.
>
> best regards
> Wolfgang Mües

void auerbuf_free(struct auerbuf *bp)
- simply do kfree. It's officially allowed to pass NULL. There's no need
  to burn cycles

static void auerchain_complete(struct urb *urb)
- Wow. I never saw a recursive interrupt handler. The logic is beyond me.
- Simply use spin_lock(). You already are in interrupt. It even saves stack space.

int auerchain_submit_urb_list(struct auerchain *acp, struct urb *urb,
+       urb->status = -EINPROGRESS;     /* usb_submit_urb does this, too */
Yes, it does. And no driver has any business poking there. This is too ugly
to let live.

int auerchain_unlink_urb(struct auerchain *acp, struct urb *urb)
+                       spin_unlock_irqrestore(&acp->lock, flags);
+                       dbg("unlink waiting urb");
+                       urb->status = -ENOENT;
+                       urb->complete(urb);
Please no. Don't do this.

I am afraid there are severe layering violations in this code.

        Regards
                Oliver




-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to