aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/aachba.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/aacraid/aachba.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/aacraid/aachba.c')
-rw-r--r--drivers/scsi/aacraid/aachba.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
index acc3d9209879..2a128a156aa1 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -1464,7 +1464,7 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd)
1464 * Test does not apply to ID 16, the pseudo id for the controller 1464 * Test does not apply to ID 16, the pseudo id for the controller
1465 * itself. 1465 * itself.
1466 */ 1466 */
1467 if (scsicmd->device->id != host->this_id) { 1467 if (scmd_id(scsicmd) != host->this_id) {
1468 if ((scsicmd->device->channel == 0) ){ 1468 if ((scsicmd->device->channel == 0) ){
1469 if( (scsicmd->device->id >= dev->maximum_num_containers) || (scsicmd->device->lun != 0)){ 1469 if( (scsicmd->device->id >= dev->maximum_num_containers) || (scsicmd->device->lun != 0)){
1470 scsicmd->result = DID_NO_CONNECT << 16; 1470 scsicmd->result = DID_NO_CONNECT << 16;
@@ -1559,7 +1559,7 @@ int aac_scsi_cmd(struct scsi_cmnd * scsicmd)
1559 * Set the Vendor, Product, and Revision Level 1559 * Set the Vendor, Product, and Revision Level
1560 * see: <vendor>.c i.e. aac.c 1560 * see: <vendor>.c i.e. aac.c
1561 */ 1561 */
1562 if (scsicmd->device->id == host->this_id) { 1562 if (scmd_id(scsicmd) == host->this_id) {
1563 setinqstr(dev, (void *) (inq_data.inqd_vid), (sizeof(container_types)/sizeof(char *))); 1563 setinqstr(dev, (void *) (inq_data.inqd_vid), (sizeof(container_types)/sizeof(char *)));
1564 inq_data.inqd_pdt = INQD_PDT_PROC; /* Processor device */ 1564 inq_data.inqd_pdt = INQD_PDT_PROC; /* Processor device */
1565 aac_internal_transfer(scsicmd, &inq_data, 0, sizeof(inq_data)); 1565 aac_internal_transfer(scsicmd, &inq_data, 0, sizeof(inq_data));
@@ -1949,7 +1949,7 @@ static void aac_srb_callback(void *context, struct fib * fibptr)
1949 * the channel is 2 1949 * the channel is 2
1950 */ 1950 */
1951 } else if ((dev->raid_scsi_mode) && 1951 } else if ((dev->raid_scsi_mode) &&
1952 (scsicmd->device->channel == 2)) { 1952 (scmd_channel(scsicmd) == 2)) {
1953 scsicmd->result = DID_OK << 16 | 1953 scsicmd->result = DID_OK << 16 |
1954 COMMAND_COMPLETE << 8; 1954 COMMAND_COMPLETE << 8;
1955 } else { 1955 } else {
@@ -1993,7 +1993,7 @@ static void aac_srb_callback(void *context, struct fib * fibptr)
1993 * the channel is 2 1993 * the channel is 2
1994 */ 1994 */
1995 } else if ((dev->raid_scsi_mode) && 1995 } else if ((dev->raid_scsi_mode) &&
1996 (scsicmd->device->channel == 2)) { 1996 (scmd_channel(scsicmd) == 2)) {
1997 scsicmd->result = DID_OK << 16 | 1997 scsicmd->result = DID_OK << 16 |
1998 COMMAND_COMPLETE << 8; 1998 COMMAND_COMPLETE << 8;
1999 } else { 1999 } else {