All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] bnx2fc: bnx2fc_fcoe.c: match wait_for_completion_timeout return type
@ 2015-03-04 14:26 Nicholas Mc Guire
  2015-03-09 13:54   ` Chad Dupuis
  0 siblings, 1 reply; 3+ messages in thread
From: Nicholas Mc Guire @ 2015-03-04 14:26 UTC (permalink / raw)
  To: James E.J. Bottomley; +Cc: linux-scsi, linux-kernel, Nicholas Mc Guire

return type of wait_for_completion_timeout is unsigned long not int. rc
is appropriately renamed, changed to type unsigned long and the
assignments fixed up.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---

The was only compile tested with x86_64_defconfig + SCSI_LOWLEVEL
CONFIG_SCSI_FC_ATTRS=m, CONFIG_LIBFC=m, CONFIG_LIBFCOE=m,
CONFIG_SCSI_BNX2X_FCOE=m

Patch is against 4.0-rc2 (localversion-next is -next-20150304)

 drivers/scsi/bnx2fc/bnx2fc_fcoe.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 98d06d1..0082b5c 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -635,7 +635,7 @@ static struct fc_host_statistics *bnx2fc_get_host_stats(struct Scsi_Host *shost)
 	struct bnx2fc_interface *interface = port->priv;
 	struct bnx2fc_hba *hba = interface->hba;
 	struct fcoe_statistics_params *fw_stats;
-	int rc = 0;
+	unsigned long time_left;
 
 	fw_stats = (struct fcoe_statistics_params *)hba->stats_buffer;
 	if (!fw_stats)
@@ -646,8 +646,8 @@ static struct fc_host_statistics *bnx2fc_get_host_stats(struct Scsi_Host *shost)
 	init_completion(&hba->stat_req_done);
 	if (bnx2fc_send_stat_req(hba))
 		return bnx2fc_stats;
-	rc = wait_for_completion_timeout(&hba->stat_req_done, (2 * HZ));
-	if (!rc) {
+	time_left = wait_for_completion_timeout(&hba->stat_req_done, (2 * HZ));
+	if (!time_left) {
 		BNX2FC_HBA_DBG(lport, "FW stat req timed out\n");
 		return bnx2fc_stats;
 	}
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] bnx2fc: bnx2fc_fcoe.c: match wait_for_completion_timeout return type
  2015-03-04 14:26 [PATCH 1/2] bnx2fc: bnx2fc_fcoe.c: match wait_for_completion_timeout return type Nicholas Mc Guire
@ 2015-03-09 13:54   ` Chad Dupuis
  0 siblings, 0 replies; 3+ messages in thread
From: Chad Dupuis @ 2015-03-09 13:54 UTC (permalink / raw)
  To: Nicholas Mc Guire; +Cc: James E.J. Bottomley, linux-scsi, linux-kernel

Looks ok.

Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>

On Wed, 4 Mar 2015, Nicholas Mc Guire wrote:

> return type of wait_for_completion_timeout is unsigned long not int. rc
> is appropriately renamed, changed to type unsigned long and the
> assignments fixed up.
>
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
> ---
>
> The was only compile tested with x86_64_defconfig + SCSI_LOWLEVEL
> CONFIG_SCSI_FC_ATTRS=m, CONFIG_LIBFC=m, CONFIG_LIBFCOE=m,
> CONFIG_SCSI_BNX2X_FCOE=m
>
> Patch is against 4.0-rc2 (localversion-next is -next-20150304)
>
> drivers/scsi/bnx2fc/bnx2fc_fcoe.c |    6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
> index 98d06d1..0082b5c 100644
> --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
> +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
> @@ -635,7 +635,7 @@ static struct fc_host_statistics *bnx2fc_get_host_stats(struct Scsi_Host *shost)
> 	struct bnx2fc_interface *interface = port->priv;
> 	struct bnx2fc_hba *hba = interface->hba;
> 	struct fcoe_statistics_params *fw_stats;
> -	int rc = 0;
> +	unsigned long time_left;
>
> 	fw_stats = (struct fcoe_statistics_params *)hba->stats_buffer;
> 	if (!fw_stats)
> @@ -646,8 +646,8 @@ static struct fc_host_statistics *bnx2fc_get_host_stats(struct Scsi_Host *shost)
> 	init_completion(&hba->stat_req_done);
> 	if (bnx2fc_send_stat_req(hba))
> 		return bnx2fc_stats;
> -	rc = wait_for_completion_timeout(&hba->stat_req_done, (2 * HZ));
> -	if (!rc) {
> +	time_left = wait_for_completion_timeout(&hba->stat_req_done, (2 * HZ));
> +	if (!time_left) {
> 		BNX2FC_HBA_DBG(lport, "FW stat req timed out\n");
> 		return bnx2fc_stats;
> 	}
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] bnx2fc: bnx2fc_fcoe.c: match wait_for_completion_timeout return type
@ 2015-03-09 13:54   ` Chad Dupuis
  0 siblings, 0 replies; 3+ messages in thread
From: Chad Dupuis @ 2015-03-09 13:54 UTC (permalink / raw)
  To: Nicholas Mc Guire; +Cc: James E.J. Bottomley, linux-scsi, linux-kernel

Looks ok.

Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>

On Wed, 4 Mar 2015, Nicholas Mc Guire wrote:

> return type of wait_for_completion_timeout is unsigned long not int. rc
> is appropriately renamed, changed to type unsigned long and the
> assignments fixed up.
>
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
> ---
>
> The was only compile tested with x86_64_defconfig + SCSI_LOWLEVEL
> CONFIG_SCSI_FC_ATTRS=m, CONFIG_LIBFC=m, CONFIG_LIBFCOE=m,
> CONFIG_SCSI_BNX2X_FCOE=m
>
> Patch is against 4.0-rc2 (localversion-next is -next-20150304)
>
> drivers/scsi/bnx2fc/bnx2fc_fcoe.c |    6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
> index 98d06d1..0082b5c 100644
> --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
> +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
> @@ -635,7 +635,7 @@ static struct fc_host_statistics *bnx2fc_get_host_stats(struct Scsi_Host *shost)
> 	struct bnx2fc_interface *interface = port->priv;
> 	struct bnx2fc_hba *hba = interface->hba;
> 	struct fcoe_statistics_params *fw_stats;
> -	int rc = 0;
> +	unsigned long time_left;
>
> 	fw_stats = (struct fcoe_statistics_params *)hba->stats_buffer;
> 	if (!fw_stats)
> @@ -646,8 +646,8 @@ static struct fc_host_statistics *bnx2fc_get_host_stats(struct Scsi_Host *shost)
> 	init_completion(&hba->stat_req_done);
> 	if (bnx2fc_send_stat_req(hba))
> 		return bnx2fc_stats;
> -	rc = wait_for_completion_timeout(&hba->stat_req_done, (2 * HZ));
> -	if (!rc) {
> +	time_left = wait_for_completion_timeout(&hba->stat_req_done, (2 * HZ));
> +	if (!time_left) {
> 		BNX2FC_HBA_DBG(lport, "FW stat req timed out\n");
> 		return bnx2fc_stats;
> 	}
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-09 13:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-04 14:26 [PATCH 1/2] bnx2fc: bnx2fc_fcoe.c: match wait_for_completion_timeout return type Nicholas Mc Guire
2015-03-09 13:54 ` Chad Dupuis
2015-03-09 13:54   ` Chad Dupuis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.