aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ips.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-24 18:05:09 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-10-28 22:10:16 -0400
commit422c0d61d591cbfb70f029e13505fb437e169d68 (patch)
treeebafa14e1c1564ddf263868c3b6907642a8fdf1e /drivers/scsi/ips.c
parent017560fca496f72ed9dd734ffde63ce39dfe0411 (diff)
[SCSI] use scmd_id(), scmd_channel() throughout code
Wrap a highly common idiom. Makes the code easier to read, helps pave the way for sdev->{id,channel} removal, and adds a token that can easily by grepped-for in the future. There are a couple sdev_id() and scmd_printk() updates thrown in as well. Rejections fixed up and Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/ips.c')
-rw-r--r--drivers/scsi/ips.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
index 4cdd891781b1..eeae7ccb0dd2 100644
--- a/drivers/scsi/ips.c
+++ b/drivers/scsi/ips.c
@@ -1125,8 +1125,8 @@ ips_queue(Scsi_Cmnd * SC, void (*done) (Scsi_Cmnd *))
1125 SC->device->channel, SC->device->id, SC->device->lun); 1125 SC->device->channel, SC->device->id, SC->device->lun);
1126 1126
1127 /* Check for command to initiator IDs */ 1127 /* Check for command to initiator IDs */
1128 if ((SC->device->channel > 0) 1128 if ((scmd_channel(SC) > 0)
1129 && (SC->device->id == ha->ha_id[SC->device->channel])) { 1129 && (scmd_id(SC) == ha->ha_id[scmd_channel(SC)])) {
1130 SC->result = DID_NO_CONNECT << 16; 1130 SC->result = DID_NO_CONNECT << 16;
1131 done(SC); 1131 done(SC);
1132 1132
@@ -2830,10 +2830,10 @@ ips_next(ips_ha_t * ha, int intr)
2830 2830
2831 p = ha->scb_waitlist.head; 2831 p = ha->scb_waitlist.head;
2832 while ((p) && (scb = ips_getscb(ha))) { 2832 while ((p) && (scb = ips_getscb(ha))) {
2833 if ((p->device->channel > 0) 2833 if ((scmd_channel(p) > 0)
2834 && (ha-> 2834 && (ha->
2835 dcdb_active[p->device->channel - 2835 dcdb_active[scmd_channel(p) -
2836 1] & (1 << p->device->id))) { 2836 1] & (1 << scmd_id(p)))) {
2837 ips_freescb(ha, scb); 2837 ips_freescb(ha, scb);
2838 p = (Scsi_Cmnd *) p->host_scribble; 2838 p = (Scsi_Cmnd *) p->host_scribble;
2839 continue; 2839 continue;