Re: [PATCH 8/24] mpt fusion: [2.6.30-rc6]rewrite taskmanagement request and completion routines

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

 



On Fri, 2009-05-22 at 16:24 +0530, Kashyap, Desai wrote:
> +int
> +mpt_set_taskmgmt_in_progress_flag(MPT_ADAPTER *ioc)
> +{
> +	unsigned long	 flags;
> +	int		 retval;
> +
> +	spin_lock_irqsave(&ioc->taskmgmt_lock, flags);
> +	if (ioc->ioc_reset_in_progress || ioc->taskmgmt_in_progress ||
> +	    (ioc->alt_ioc && ioc->alt_ioc->taskmgmt_in_progress)) {
> +		retval = -1;
> +		spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);
remove this line ^^^^^^^^^^^

> +		goto out;
> +	}
> +	retval = 0;
> +	ioc->taskmgmt_in_progress = 1;
> +	if (ioc->alt_ioc) {
> +		ioc->alt_ioc->taskmgmt_in_progress = 1;
> +	}

And these braces.

And put the out: label here instead.

> +	spin_unlock_irqrestore(&ioc->taskmgmt_lock, flags);
> +
> + out:
> +	return retval;
> +}
> +EXPORT_SYMBOL(mpt_set_taskmgmt_in_progress_flag);
> +
> +/**
> + *	mpt_clear_taskmgmt_in_progress_flag - clear flags associated with task managment
> + *	@ioc: Pointer to MPT_ADAPTER structure
> + *
> + **/
> +void
> +mpt_clear_taskmgmt_in_progress_flag(MPT_ADAPTER *ioc)
> +{
> +	unsigned long	 flags;
> +
> +	spin_lock_irqsave(&ioc->taskmgmt_lock, flags);
> +	ioc->taskmgmt_in_progress = 0;
> +	if (ioc->alt_ioc) {
> +		ioc->alt_ioc->taskmgmt_in_progress = 0;
> +	}

And these braces

James


--
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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux