On Mon, 22 Mar 2004 22:21:14 +0100
Oliver Neukum <[EMAIL PROTECTED]> wrote:

> you are using an irqsave spinlock in a completion handler. Not actually
> wrong but it tends to confuse people about the context the function is
> executed under.

>       priv = usb_get_serial_port_data(port);
> -     spin_lock_irqsave(&priv->lock, flags);
> +     spin_lock(&priv->lock);
>       priv->last_msr = data[BELKIN_SA_MSR_INDEX];

I strongly disagree with this point of view. Keeping track of a
context in which a function can be called places an unreasonable
burden on a programmer and introduces extremely annoying code rot
whenever code migrates contexts.

-- Pete


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to