All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fnic: remove a pointless test
@ 2016-11-01 16:40 Tomas Henzl
  2016-11-14 23:48 ` Martin K. Petersen
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Tomas Henzl @ 2016-11-01 16:40 UTC (permalink / raw)
  To: linux-scsi; +Cc: sramars, hiralpat, buchino

rport can't be null here, it would have failed already in
fc_remote_port_chkready

Signed-off-by: Tomas Henzl <thenzl@redhat.com>
---
 drivers/scsi/fnic/fnic_scsi.c | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c
index d9fd2f8415..1d3ecaee56 100644
--- a/drivers/scsi/fnic/fnic_scsi.c
+++ b/drivers/scsi/fnic/fnic_scsi.c
@@ -441,6 +441,7 @@ static int fnic_queuecommand_lck(struct scsi_cmnd *sc, void (*done)(struct scsi_
 	unsigned long ptr;
 	spinlock_t *io_lock = NULL;
 	int io_lock_acquired = 0;
+	struct fc_rport_libfc_priv *rp;
 
 	if (unlikely(fnic_chk_state_flags_locked(fnic, FNIC_FLAGS_IO_BLOCKED)))
 		return SCSI_MLQUEUE_HOST_BUSY;
@@ -454,17 +455,14 @@ static int fnic_queuecommand_lck(struct scsi_cmnd *sc, void (*done)(struct scsi_
 		return 0;
 	}
 
-	if (rport) {
-		struct fc_rport_libfc_priv *rp = rport->dd_data;
-
-		if (!rp || rp->rp_state != RPORT_ST_READY) {
-			FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host,
-				"returning DID_NO_CONNECT for IO as rport is removed\n");
-			atomic64_inc(&fnic_stats->misc_stats.rport_not_ready);
-			sc->result = DID_NO_CONNECT<<16;
-			done(sc);
-			return 0;
-		}
+	rp = rport->dd_data;
+	if (!rp || rp->rp_state != RPORT_ST_READY) {
+		FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host,
+			"returning DID_NO_CONNECT for IO as rport is removed\n");
+		atomic64_inc(&fnic_stats->misc_stats.rport_not_ready);
+		sc->result = DID_NO_CONNECT<<16;
+		done(sc);
+		return 0;
 	}
 
 	if (lp->state != LPORT_ST_READY || !(lp->link_up))
-- 
2.7.4


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

* Re: [PATCH] fnic: remove a pointless test
  2016-11-01 16:40 [PATCH] fnic: remove a pointless test Tomas Henzl
@ 2016-11-14 23:48 ` Martin K. Petersen
  2016-11-17  1:39 ` Martin K. Petersen
  2016-11-17 14:14 ` Tomas Henzl
  2 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2016-11-14 23:48 UTC (permalink / raw)
  To: Tomas Henzl; +Cc: linux-scsi, sramars, hiralpat, buchino

>>>>> "Tomas" == Tomas Henzl <thenzl@redhat.com> writes:

Tomas> rport can't be null here, it would have failed already in
Tomas> fc_remote_port_chkready

Cisco folks: Please review!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH] fnic: remove a pointless test
  2016-11-01 16:40 [PATCH] fnic: remove a pointless test Tomas Henzl
  2016-11-14 23:48 ` Martin K. Petersen
@ 2016-11-17  1:39 ` Martin K. Petersen
  2016-11-17 14:14 ` Tomas Henzl
  2 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2016-11-17  1:39 UTC (permalink / raw)
  To: Satish Kharat, Sesidhar Baddela; +Cc: Tomas Henzl, linux-scsi


Satish, Sesidhar,

Please review Tomas' patch:

	https://patchwork.kernel.org/patch/9407637/

Thank you!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH] fnic: remove a pointless test
  2016-11-01 16:40 [PATCH] fnic: remove a pointless test Tomas Henzl
  2016-11-14 23:48 ` Martin K. Petersen
  2016-11-17  1:39 ` Martin K. Petersen
@ 2016-11-17 14:14 ` Tomas Henzl
  2016-11-18  1:52   ` Martin K. Petersen
  2 siblings, 1 reply; 5+ messages in thread
From: Tomas Henzl @ 2016-11-17 14:14 UTC (permalink / raw)
  To: linux-scsi; +Cc: sramars, hiralpat, buchino

On 1.11.2016 17:40, Tomas Henzl wrote:
> rport can't be null here, it would have failed already in
> fc_remote_port_chkready
>
> Signed-off-by: Tomas Henzl <thenzl@redhat.com>

Martin,
another (better) patch  "fnic: Correcting rport check location in fnic_queuecommand_lck"
has been added to 4.10/scsi-queue.

Please drop this one.

Tomas


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

* Re: [PATCH] fnic: remove a pointless test
  2016-11-17 14:14 ` Tomas Henzl
@ 2016-11-18  1:52   ` Martin K. Petersen
  0 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2016-11-18  1:52 UTC (permalink / raw)
  To: Tomas Henzl; +Cc: linux-scsi, sramars, hiralpat, buchino

>>>>> "Tomas" == Tomas Henzl <thenzl@redhat.com> writes:

Tomas> Martin, another (better) patch "fnic: Correcting rport check
Tomas> location in fnic_queuecommand_lck" has been added to
Tomas> 4.10/scsi-queue.

Tomas> Please drop this one.

Done!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2016-11-18  1:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-01 16:40 [PATCH] fnic: remove a pointless test Tomas Henzl
2016-11-14 23:48 ` Martin K. Petersen
2016-11-17  1:39 ` Martin K. Petersen
2016-11-17 14:14 ` Tomas Henzl
2016-11-18  1:52   ` Martin K. Petersen

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.