Skip to content

Commit 78adb2b

Browse files
Johannes Thumshirnmartinkpetersen
authored andcommitted
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: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent c6668ca commit 78adb2b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/scsi/ncr53c8xx.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4611,7 +4611,7 @@ static int ncr_reset_bus (struct ncb *np, struct scsi_cmnd *cmd, int sync_reset)
46114611
* in order to keep it alive.
46124612
*/
46134613
if (!found && sync_reset && !retrieve_from_waiting_list(0, np, cmd)) {
4614-
cmd->result = ScsiResult(DID_RESET, 0);
4614+
cmd->result = DID_RESET << 16;
46154615
ncr_queue_done_cmd(np, cmd);
46164616
}
46174617

@@ -4957,7 +4957,7 @@ void ncr_complete (struct ncb *np, struct ccb *cp)
49574957
/*
49584958
** Check condition code
49594959
*/
4960-
cmd->result = ScsiResult(DID_OK, S_CHECK_COND);
4960+
cmd->result = DID_OK << 16 | S_CHECK_COND;
49614961

49624962
/*
49634963
** Copy back sense data to caller's buffer.
@@ -4978,7 +4978,7 @@ void ncr_complete (struct ncb *np, struct ccb *cp)
49784978
/*
49794979
** Reservation Conflict condition code
49804980
*/
4981-
cmd->result = ScsiResult(DID_OK, S_CONFLICT);
4981+
cmd->result = DID_OK << 16 | S_CONFLICT;
49824982

49834983
} else if ((cp->host_status == HS_COMPLETE)
49844984
&& (cp->scsi_status == S_BUSY ||
@@ -8043,7 +8043,7 @@ printk("ncr53c8xx_queue_command\n");
80438043
spin_lock_irqsave(&np->smp_lock, flags);
80448044

80458045
if ((sts = ncr_queue_command(np, cmd)) != DID_OK) {
8046-
cmd->result = ScsiResult(sts, 0);
8046+
cmd->result = sts << 16;
80478047
#ifdef DEBUG_NCR53C8XX
80488048
printk("ncr53c8xx : command not queued - result=%d\n", sts);
80498049
#endif
@@ -8234,7 +8234,7 @@ static void process_waiting_list(struct ncb *np, int sts)
82348234
#ifdef DEBUG_WAITING_LIST
82358235
printk("%s: cmd %lx done forced sts=%d\n", ncr_name(np), (u_long) wcmd, sts);
82368236
#endif
8237-
wcmd->result = ScsiResult(sts, 0);
8237+
wcmd->result = sts << 16;
82388238
ncr_queue_done_cmd(np, wcmd);
82398239
}
82408240
}

0 commit comments

Comments
 (0)