public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: "Kashyap, Desai" <kashyap.desai@lsi.com>
Cc: linux-scsi@vger.kernel.org, Eric.Moore@lsi.com, Sathya.Prakash@lsi.com
Subject: Re: [PATCH 8/24] mpt fusion: [2.6.30-rc6]rewrite taskmanagement request and completion routines
Date: Fri, 22 May 2009 15:27:06 +0000	[thread overview]
Message-ID: <1243006026.2873.13.camel@localhost.localdomain> (raw)
In-Reply-To: <20090522105425.GB16331@lsi.com>

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



      reply	other threads:[~2009-05-22 15:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-22 10:54 [PATCH 8/24] mpt fusion: [2.6.30-rc6]rewrite taskmanagement request and completion routines Kashyap, Desai
2009-05-22 15:27 ` James Bottomley [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1243006026.2873.13.camel@localhost.localdomain \
    --to=james.bottomley@hansenpartnership.com \
    --cc=Eric.Moore@lsi.com \
    --cc=Sathya.Prakash@lsi.com \
    --cc=kashyap.desai@lsi.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox