* [PATCH] bnx2fc: bnx2fc_eh_abort(): fix wrong return code.
@ 2016-02-01 15:08 Maurizio Lombardi
2016-02-01 15:32 ` Ewan Milne
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Maurizio Lombardi @ 2016-02-01 15:08 UTC (permalink / raw)
To: QLogic-Storage-Upstream; +Cc: JBottomley, linux-scsi, chad.dupuis
If the link is not ready, the bnx2fc_eh_abort() function
should return FAILED.
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
---
drivers/scsi/bnx2fc/bnx2fc_io.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
index 0002caf..2230dab 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_io.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
@@ -1104,8 +1104,7 @@ int bnx2fc_eh_abort(struct scsi_cmnd *sc_cmd)
struct bnx2fc_cmd *io_req;
struct fc_lport *lport;
struct bnx2fc_rport *tgt;
- int rc = FAILED;
-
+ int rc;
rc = fc_block_scsi_eh(sc_cmd);
if (rc)
@@ -1114,7 +1113,7 @@ int bnx2fc_eh_abort(struct scsi_cmnd *sc_cmd)
lport = shost_priv(sc_cmd->device->host);
if ((lport->state != LPORT_ST_READY) || !(lport->link_up)) {
printk(KERN_ERR PFX "eh_abort: link not ready\n");
- return rc;
+ return FAILED;
}
tgt = (struct bnx2fc_rport *)&rp[1];
--
Maurizio Lombardi
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] bnx2fc: bnx2fc_eh_abort(): fix wrong return code.
2016-02-01 15:08 [PATCH] bnx2fc: bnx2fc_eh_abort(): fix wrong return code Maurizio Lombardi
@ 2016-02-01 15:32 ` Ewan Milne
2016-02-01 16:02 ` Chad Dupuis
2016-02-02 1:50 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Ewan Milne @ 2016-02-01 15:32 UTC (permalink / raw)
To: Maurizio Lombardi
Cc: QLogic-Storage-Upstream, JBottomley, linux-scsi, chad.dupuis
On Mon, 2016-02-01 at 16:08 +0100, Maurizio Lombardi wrote:
> If the link is not ready, the bnx2fc_eh_abort() function
> should return FAILED.
>
> Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
> ---
> drivers/scsi/bnx2fc/bnx2fc_io.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
> index 0002caf..2230dab 100644
> --- a/drivers/scsi/bnx2fc/bnx2fc_io.c
> +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
> @@ -1104,8 +1104,7 @@ int bnx2fc_eh_abort(struct scsi_cmnd *sc_cmd)
> struct bnx2fc_cmd *io_req;
> struct fc_lport *lport;
> struct bnx2fc_rport *tgt;
> - int rc = FAILED;
> -
> + int rc;
>
> rc = fc_block_scsi_eh(sc_cmd);
> if (rc)
> @@ -1114,7 +1113,7 @@ int bnx2fc_eh_abort(struct scsi_cmnd *sc_cmd)
> lport = shost_priv(sc_cmd->device->host);
> if ((lport->state != LPORT_ST_READY) || !(lport->link_up)) {
> printk(KERN_ERR PFX "eh_abort: link not ready\n");
> - return rc;
> + return FAILED;
> }
>
> tgt = (struct bnx2fc_rport *)&rp[1];
Yes, because setting the initial setting of rc = FAILED is overwritten
by the result of fc_block_scsi_eh().
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] bnx2fc: bnx2fc_eh_abort(): fix wrong return code.
2016-02-01 15:08 [PATCH] bnx2fc: bnx2fc_eh_abort(): fix wrong return code Maurizio Lombardi
2016-02-01 15:32 ` Ewan Milne
@ 2016-02-01 16:02 ` Chad Dupuis
2016-02-02 1:50 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Chad Dupuis @ 2016-02-01 16:02 UTC (permalink / raw)
To: Maurizio Lombardi; +Cc: QLogic-Storage-Upstream, JBottomley, linux-scsi
On Mon, 1 Feb 2016, Maurizio Lombardi wrote:
> If the link is not ready, the bnx2fc_eh_abort() function
> should return FAILED.
>
> Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
> ---
> drivers/scsi/bnx2fc/bnx2fc_io.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/bnx2fc/bnx2fc_io.c b/drivers/scsi/bnx2fc/bnx2fc_io.c
> index 0002caf..2230dab 100644
> --- a/drivers/scsi/bnx2fc/bnx2fc_io.c
> +++ b/drivers/scsi/bnx2fc/bnx2fc_io.c
> @@ -1104,8 +1104,7 @@ int bnx2fc_eh_abort(struct scsi_cmnd *sc_cmd)
> struct bnx2fc_cmd *io_req;
> struct fc_lport *lport;
> struct bnx2fc_rport *tgt;
> - int rc = FAILED;
> -
> + int rc;
>
> rc = fc_block_scsi_eh(sc_cmd);
> if (rc)
> @@ -1114,7 +1113,7 @@ int bnx2fc_eh_abort(struct scsi_cmnd *sc_cmd)
> lport = shost_priv(sc_cmd->device->host);
> if ((lport->state != LPORT_ST_READY) || !(lport->link_up)) {
> printk(KERN_ERR PFX "eh_abort: link not ready\n");
> - return rc;
> + return FAILED;
> }
>
> tgt = (struct bnx2fc_rport *)&rp[1];
>
Yes, nice catch.
Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] bnx2fc: bnx2fc_eh_abort(): fix wrong return code.
2016-02-01 15:08 [PATCH] bnx2fc: bnx2fc_eh_abort(): fix wrong return code Maurizio Lombardi
2016-02-01 15:32 ` Ewan Milne
2016-02-01 16:02 ` Chad Dupuis
@ 2016-02-02 1:50 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2016-02-02 1:50 UTC (permalink / raw)
To: Maurizio Lombardi
Cc: QLogic-Storage-Upstream, JBottomley, linux-scsi, chad.dupuis
>>>>> "Maurizio" == Maurizio Lombardi <mlombard@redhat.com> writes:
Maurizio> If the link is not ready, the bnx2fc_eh_abort() function
Maurizio> should return FAILED.
Applied to 4.6/scsi-queue.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-02 1:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-01 15:08 [PATCH] bnx2fc: bnx2fc_eh_abort(): fix wrong return code Maurizio Lombardi
2016-02-01 15:32 ` Ewan Milne
2016-02-01 16:02 ` Chad Dupuis
2016-02-02 1:50 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox