* [patch 02/26] drivers/scsi/fnic/fnic_scsi.c: clean up
@ 2010-05-24 19:22 akpm
0 siblings, 0 replies; 2+ messages in thread
From: akpm @ 2010-05-24 19:22 UTC (permalink / raw)
To: James.Bottomley; +Cc: linux-scsi, akpm, roel.kluin, abjoglek
From: Roel Kluin <roel.kluin@gmail.com>
In fnic_abort_cmd() and fnic_device_reset() assign `rport' earlier to make
FNIC_SCSI_DBG() calls cleaner.
In fnic_clean_pending_aborts() `rport' is not used.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Acked-by: Abhijeet Joglekar <abjoglek@cisco.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/scsi/fnic/fnic_scsi.c | 22 ++++++++--------------
1 file changed, 8 insertions(+), 14 deletions(-)
diff -puN drivers/scsi/fnic/fnic_scsi.c~drivers-scsi-fnic-fnic_scsic-clean-up drivers/scsi/fnic/fnic_scsi.c
--- a/drivers/scsi/fnic/fnic_scsi.c~drivers-scsi-fnic-fnic_scsic-clean-up
+++ a/drivers/scsi/fnic/fnic_scsi.c
@@ -1246,11 +1246,10 @@ int fnic_abort_cmd(struct scsi_cmnd *sc)
lp = shost_priv(sc->device->host);
fnic = lport_priv(lp);
- FNIC_SCSI_DBG(KERN_DEBUG,
- fnic->lport->host,
- "Abort Cmd called FCID 0x%x, LUN 0x%x TAG %d\n",
- (starget_to_rport(scsi_target(sc->device)))->port_id,
- sc->device->lun, sc->request->tag);
+ rport = starget_to_rport(scsi_target(sc->device));
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host,
+ "Abort Cmd called FCID 0x%x, LUN 0x%x TAG %d\n",
+ rport->port_id, sc->device->lun, sc->request->tag);
if (lp->state != LPORT_ST_READY || !(lp->link_up)) {
ret = FAILED;
@@ -1299,7 +1298,6 @@ int fnic_abort_cmd(struct scsi_cmnd *sc)
* port is up, then send abts to the remote port to terminate
* the IO. Else, just locally terminate the IO in the firmware
*/
- rport = starget_to_rport(scsi_target(sc->device));
if (fc_remote_port_chkready(rport) == 0)
task_req = FCPIO_ITMF_ABT_TASK;
else
@@ -1418,7 +1416,6 @@ static int fnic_clean_pending_aborts(str
unsigned long flags;
int ret = 0;
struct scsi_cmnd *sc;
- struct fc_rport *rport;
struct scsi_lun fc_lun;
struct scsi_device *lun_dev = lr_sc->device;
DECLARE_COMPLETION_ONSTACK(tm_done);
@@ -1458,7 +1455,6 @@ static int fnic_clean_pending_aborts(str
/* Now queue the abort command to firmware */
int_to_scsilun(sc->device->lun, &fc_lun);
- rport = starget_to_rport(scsi_target(sc->device));
if (fnic_queue_abort_io_req(fnic, tag,
FCPIO_ITMF_ABT_TASK_TERM,
@@ -1528,18 +1524,16 @@ int fnic_device_reset(struct scsi_cmnd *
lp = shost_priv(sc->device->host);
fnic = lport_priv(lp);
- FNIC_SCSI_DBG(KERN_DEBUG,
- fnic->lport->host,
- "Device reset called FCID 0x%x, LUN 0x%x\n",
- (starget_to_rport(scsi_target(sc->device)))->port_id,
- sc->device->lun);
+ rport = starget_to_rport(scsi_target(sc->device));
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host,
+ "Device reset called FCID 0x%x, LUN 0x%x\n",
+ rport->port_id, sc->device->lun);
if (lp->state != LPORT_ST_READY || !(lp->link_up))
goto fnic_device_reset_end;
/* Check if remote port up */
- rport = starget_to_rport(scsi_target(sc->device));
if (fc_remote_port_chkready(rport))
goto fnic_device_reset_end;
_
^ permalink raw reply [flat|nested] 2+ messages in thread* [patch 02/26] drivers/scsi/fnic/fnic_scsi.c: clean up
@ 2010-03-11 22:09 akpm
0 siblings, 0 replies; 2+ messages in thread
From: akpm @ 2010-03-11 22:09 UTC (permalink / raw)
To: James.Bottomley; +Cc: linux-scsi, akpm, roel.kluin, abjoglek
From: Roel Kluin <roel.kluin@gmail.com>
In fnic_abort_cmd() and fnic_device_reset() assign `rport' earlier to make
FNIC_SCSI_DBG() calls cleaner.
In fnic_clean_pending_aborts() `rport' is not used.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Acked-by: Abhijeet Joglekar <abjoglek@cisco.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/scsi/fnic/fnic_scsi.c | 22 ++++++++--------------
1 file changed, 8 insertions(+), 14 deletions(-)
diff -puN drivers/scsi/fnic/fnic_scsi.c~drivers-scsi-fnic-fnic_scsic-clean-up drivers/scsi/fnic/fnic_scsi.c
--- a/drivers/scsi/fnic/fnic_scsi.c~drivers-scsi-fnic-fnic_scsic-clean-up
+++ a/drivers/scsi/fnic/fnic_scsi.c
@@ -1245,11 +1245,10 @@ int fnic_abort_cmd(struct scsi_cmnd *sc)
lp = shost_priv(sc->device->host);
fnic = lport_priv(lp);
- FNIC_SCSI_DBG(KERN_DEBUG,
- fnic->lport->host,
- "Abort Cmd called FCID 0x%x, LUN 0x%x TAG %d\n",
- (starget_to_rport(scsi_target(sc->device)))->port_id,
- sc->device->lun, sc->request->tag);
+ rport = starget_to_rport(scsi_target(sc->device));
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host,
+ "Abort Cmd called FCID 0x%x, LUN 0x%x TAG %d\n",
+ rport->port_id, sc->device->lun, sc->request->tag);
if (lp->state != LPORT_ST_READY || !(lp->link_up)) {
ret = FAILED;
@@ -1298,7 +1297,6 @@ int fnic_abort_cmd(struct scsi_cmnd *sc)
* port is up, then send abts to the remote port to terminate
* the IO. Else, just locally terminate the IO in the firmware
*/
- rport = starget_to_rport(scsi_target(sc->device));
if (fc_remote_port_chkready(rport) == 0)
task_req = FCPIO_ITMF_ABT_TASK;
else
@@ -1417,7 +1415,6 @@ static int fnic_clean_pending_aborts(str
unsigned long flags;
int ret = 0;
struct scsi_cmnd *sc;
- struct fc_rport *rport;
struct scsi_lun fc_lun;
struct scsi_device *lun_dev = lr_sc->device;
DECLARE_COMPLETION_ONSTACK(tm_done);
@@ -1457,7 +1454,6 @@ static int fnic_clean_pending_aborts(str
/* Now queue the abort command to firmware */
int_to_scsilun(sc->device->lun, &fc_lun);
- rport = starget_to_rport(scsi_target(sc->device));
if (fnic_queue_abort_io_req(fnic, tag,
FCPIO_ITMF_ABT_TASK_TERM,
@@ -1527,18 +1523,16 @@ int fnic_device_reset(struct scsi_cmnd *
lp = shost_priv(sc->device->host);
fnic = lport_priv(lp);
- FNIC_SCSI_DBG(KERN_DEBUG,
- fnic->lport->host,
- "Device reset called FCID 0x%x, LUN 0x%x\n",
- (starget_to_rport(scsi_target(sc->device)))->port_id,
- sc->device->lun);
+ rport = starget_to_rport(scsi_target(sc->device));
+ FNIC_SCSI_DBG(KERN_DEBUG, fnic->lport->host,
+ "Device reset called FCID 0x%x, LUN 0x%x\n",
+ rport->port_id, sc->device->lun);
if (lp->state != LPORT_ST_READY || !(lp->link_up))
goto fnic_device_reset_end;
/* Check if remote port up */
- rport = starget_to_rport(scsi_target(sc->device));
if (fc_remote_port_chkready(rport))
goto fnic_device_reset_end;
_
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-24 19:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-24 19:22 [patch 02/26] drivers/scsi/fnic/fnic_scsi.c: clean up akpm
-- strict thread matches above, loose matches on Subject: below --
2010-03-11 22:09 akpm
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).