From: Vasu Dev <vasu.dev@linux.intel.com>
To: Nicholas Mc Guire <hofrat@osadl.org>
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>,
fcoe-devel@open-fcoe.org, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: match wait_for_completion_timeout return type
Date: Wed, 18 Mar 2015 10:33:40 -0700 [thread overview]
Message-ID: <1426700020.9426.37.camel@vfc0> (raw)
In-Reply-To: <1426075056-27410-1-git-send-email-hofrat@osadl.org>
On Wed, 2015-03-11 at 07:57 -0400, Nicholas Mc Guire wrote:
> wait_for_completion_timeout returns unsigned long not int. As other
> instances of wait_for_completion_timeout in fc_fcp.c use ticks_left
> of appropriate type, this name is used here as well.
>
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
> ---
>
> Patch was only compile tested with x86_64_defconfig + SCSI_LOWLEVEL=y
> CONFIG_SCSI_FC_ATTRS=m, CONFIG_LIBFC=m
>
> Patch is against 4.0-rc3 (localversion-next is -next-20150310)
>
> drivers/scsi/libfc/fc_fcp.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
> index c679594..c94a518 100644
> --- a/drivers/scsi/libfc/fc_fcp.c
> +++ b/drivers/scsi/libfc/fc_fcp.c
> @@ -1261,7 +1261,7 @@ static void fc_lun_reset_send(unsigned long data)
> static int fc_lun_reset(struct fc_lport *lport, struct fc_fcp_pkt *fsp,
> unsigned int id, unsigned int lun)
> {
> - int rc;
> + unsigned long ticks_left;
>
> fsp->cdb_cmd.fc_dl = htonl(fsp->data_len);
> fsp->cdb_cmd.fc_tm_flags = FCP_TMF_LUN_RESET;
> @@ -1276,7 +1276,8 @@ static int fc_lun_reset(struct fc_lport *lport, struct fc_fcp_pkt *fsp,
> * wait for completion of reset
> * after that make sure all commands are terminated
> */
> - rc = wait_for_completion_timeout(&fsp->tm_done, FC_SCSI_TM_TOV);
> + ticks_left = wait_for_completion_timeout(&fsp->tm_done,
> + FC_SCSI_TM_TOV);
>
> spin_lock_bh(&fsp->scsi_pkt_lock);
> fsp->state |= FC_SRB_COMPL;
> @@ -1292,7 +1293,7 @@ static int fc_lun_reset(struct fc_lport *lport, struct fc_fcp_pkt *fsp,
> fsp->wait_for_comp = 0;
> spin_unlock_bh(&fsp->scsi_pkt_lock);
>
> - if (!rc) {
> + if (!ticks_left) {
> FC_SCSI_DBG(lport, "lun reset failed\n");
> return FAILED;
> }
Looks good.
Acked-by: Vasu Dev <vasu.dev@intel.com>
next prev parent reply other threads:[~2015-03-18 17:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-11 11:57 [PATCH] scsi: match wait_for_completion_timeout return type Nicholas Mc Guire
2015-03-18 17:33 ` Vasu Dev [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-05-14 18:12 Nicholas Mc Guire
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=1426700020.9426.37.camel@vfc0 \
--to=vasu.dev@linux.intel.com \
--cc=JBottomley@parallels.com \
--cc=fcoe-devel@open-fcoe.org \
--cc=hofrat@osadl.org \
--cc=linux-kernel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).