mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 06:12:08 +00:00
scsi: pcmcia: Call scsi_done() directly
Conditional statements are faster than indirect calls. Hence call scsi_done() directly. Link: https://lore.kernel.org/r/20211007202923.2174984-60-bvanassche@acm.org Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
48760367a4
commit
ca0d62d29b
@ -178,7 +178,7 @@ static void nsp_scsi_done(struct scsi_cmnd *SCpnt)
|
||||
|
||||
data->CurrentSC = NULL;
|
||||
|
||||
SCpnt->scsi_done(SCpnt);
|
||||
scsi_done(SCpnt);
|
||||
}
|
||||
|
||||
static int nsp_queuecommand_lck(struct scsi_cmnd *SCpnt,
|
||||
@ -197,8 +197,6 @@ static int nsp_queuecommand_lck(struct scsi_cmnd *SCpnt,
|
||||
scsi_bufflen(SCpnt), scsi_sg_count(SCpnt));
|
||||
//nsp_dbg(NSP_DEBUG_QUEUECOMMAND, "before CurrentSC=0x%p", data->CurrentSC);
|
||||
|
||||
SCpnt->scsi_done = done;
|
||||
|
||||
if (data->CurrentSC != NULL) {
|
||||
nsp_msg(KERN_DEBUG, "CurrentSC!=NULL this can't be happen");
|
||||
SCpnt->result = DID_BAD_TARGET << 16;
|
||||
|
@ -492,7 +492,7 @@ out:
|
||||
|
||||
idle_out:
|
||||
curSC->SCp.phase = idle;
|
||||
curSC->scsi_done(curSC);
|
||||
scsi_done(curSC);
|
||||
goto out;
|
||||
}
|
||||
|
||||
@ -556,7 +556,6 @@ SYM53C500_queue_lck(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
|
||||
VDEB(printk("\n"));
|
||||
|
||||
data->current_SC = SCpnt;
|
||||
data->current_SC->scsi_done = done;
|
||||
data->current_SC->SCp.phase = command_ph;
|
||||
data->current_SC->SCp.Status = 0;
|
||||
data->current_SC->SCp.Message = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user