On Sat, Nov 27, 2010 at 11:17:36PM -0800, Nicholas A. Bellinger wrote: > /** > - * megasas_get_cmd - Get a command from the free pool > + * __megasas_get_cmd - Get a command from the free pool > * @instance: Adapter soft state > * > * Returns a free command from the pool > + * Locking: Called with instance->cmd_pool_lock w/ spin_lock_irqsave > */ > -static struct megasas_cmd *megasas_get_cmd(struct megasas_instance > - *instance) > +static struct megasas_cmd * > +__megasas_get_cmd(struct megasas_instance *instance) > { > + struct megasas_cmd *cmd; > unsigned long flags; > - struct megasas_cmd *cmd = NULL; > > spin_lock_irqsave(&instance->cmd_pool_lock, flags); --- snip --- > +static struct megasas_cmd * > +megasas_get_cmd(struct megasas_instance *instance) > +{ > + struct megasas_cmd *cmd; > + unsigned long flags; > + > + spin_lock_irqsave(&instance->cmd_pool_lock, flags); I can't see how this works. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html