Commit 78adb2bc authored by Johannes Thumshirn's avatar Johannes Thumshirn Committed by Martin K. Petersen

scsi: ncr53c8xx: remove ScsiResult macro

Remove the ScsiResult macro and open code it on all call sites.

This will make subsequent refactoring in this area easier.
Signed-off-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent c6668cae
...@@ -4611,7 +4611,7 @@ static int ncr_reset_bus (struct ncb *np, struct scsi_cmnd *cmd, int sync_reset) ...@@ -4611,7 +4611,7 @@ static int ncr_reset_bus (struct ncb *np, struct scsi_cmnd *cmd, int sync_reset)
* in order to keep it alive. * in order to keep it alive.
*/ */
if (!found && sync_reset && !retrieve_from_waiting_list(0, np, cmd)) { if (!found && sync_reset && !retrieve_from_waiting_list(0, np, cmd)) {
cmd->result = ScsiResult(DID_RESET, 0); cmd->result = DID_RESET << 16;
ncr_queue_done_cmd(np, cmd); ncr_queue_done_cmd(np, cmd);
} }
...@@ -4957,7 +4957,7 @@ void ncr_complete (struct ncb *np, struct ccb *cp) ...@@ -4957,7 +4957,7 @@ void ncr_complete (struct ncb *np, struct ccb *cp)
/* /*
** Check condition code ** Check condition code
*/ */
cmd->result = ScsiResult(DID_OK, S_CHECK_COND); cmd->result = DID_OK << 16 | S_CHECK_COND;
/* /*
** Copy back sense data to caller's buffer. ** Copy back sense data to caller's buffer.
...@@ -4978,7 +4978,7 @@ void ncr_complete (struct ncb *np, struct ccb *cp) ...@@ -4978,7 +4978,7 @@ void ncr_complete (struct ncb *np, struct ccb *cp)
/* /*
** Reservation Conflict condition code ** Reservation Conflict condition code
*/ */
cmd->result = ScsiResult(DID_OK, S_CONFLICT); cmd->result = DID_OK << 16 | S_CONFLICT;
} else if ((cp->host_status == HS_COMPLETE) } else if ((cp->host_status == HS_COMPLETE)
&& (cp->scsi_status == S_BUSY || && (cp->scsi_status == S_BUSY ||
...@@ -8043,7 +8043,7 @@ printk("ncr53c8xx_queue_command\n"); ...@@ -8043,7 +8043,7 @@ printk("ncr53c8xx_queue_command\n");
spin_lock_irqsave(&np->smp_lock, flags); spin_lock_irqsave(&np->smp_lock, flags);
if ((sts = ncr_queue_command(np, cmd)) != DID_OK) { if ((sts = ncr_queue_command(np, cmd)) != DID_OK) {
cmd->result = ScsiResult(sts, 0); cmd->result = sts << 16;
#ifdef DEBUG_NCR53C8XX #ifdef DEBUG_NCR53C8XX
printk("ncr53c8xx : command not queued - result=%d\n", sts); printk("ncr53c8xx : command not queued - result=%d\n", sts);
#endif #endif
...@@ -8234,7 +8234,7 @@ static void process_waiting_list(struct ncb *np, int sts) ...@@ -8234,7 +8234,7 @@ static void process_waiting_list(struct ncb *np, int sts)
#ifdef DEBUG_WAITING_LIST #ifdef DEBUG_WAITING_LIST
printk("%s: cmd %lx done forced sts=%d\n", ncr_name(np), (u_long) wcmd, sts); printk("%s: cmd %lx done forced sts=%d\n", ncr_name(np), (u_long) wcmd, sts);
#endif #endif
wcmd->result = ScsiResult(sts, 0); wcmd->result = sts << 16;
ncr_queue_done_cmd(np, wcmd); ncr_queue_done_cmd(np, wcmd);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment