diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-24 18:05:09 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-10-28 21:10:16 -0500 |
commit | 422c0d61d591cbfb70f029e13505fb437e169d68 (patch) | |
tree | ebafa14e1c1564ddf263868c3b6907642a8fdf1e /drivers/scsi/ips.c | |
parent | 017560fca496f72ed9dd734ffde63ce39dfe0411 (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.c | 10 |
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 *)) SC->device->channel, SC->device->id, SC->device->lun); /* Check for command to initiator IDs */ - if ((SC->device->channel > 0) - && (SC->device->id == ha->ha_id[SC->device->channel])) { + if ((scmd_channel(SC) > 0) + && (scmd_id(SC) == ha->ha_id[scmd_channel(SC)])) { SC->result = DID_NO_CONNECT << 16; done(SC); @@ -2830,10 +2830,10 @@ ips_next(ips_ha_t * ha, int intr) p = ha->scb_waitlist.head; while ((p) && (scb = ips_getscb(ha))) { - if ((p->device->channel > 0) + if ((scmd_channel(p) > 0) && (ha-> - dcdb_active[p->device->channel - - 1] & (1 << p->device->id))) { + dcdb_active[scmd_channel(p) - + 1] & (1 << scmd_id(p)))) { ips_freescb(ha, scb); p = (Scsi_Cmnd *) p->host_scribble; continue; |