scsi: dc395x: Call scsi_done() directly
Conditional statements are faster than indirect calls. Hence call scsi_done() directly. Link: https://lore.kernel.org/r/20211007202923.2174984-29-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
e82d6b179b
commit
6c365b8800
@ -995,8 +995,6 @@ static int dc395x_queue_command_lck(struct scsi_cmnd *cmd, void (*done)(struct s
|
|||||||
goto complete;
|
goto complete;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set callback and clear result in the command */
|
|
||||||
cmd->scsi_done = done;
|
|
||||||
set_host_byte(cmd, DID_OK);
|
set_host_byte(cmd, DID_OK);
|
||||||
set_status_byte(cmd, SAM_STAT_GOOD);
|
set_status_byte(cmd, SAM_STAT_GOOD);
|
||||||
|
|
||||||
@ -3336,7 +3334,7 @@ static void srb_done(struct AdapterCtlBlk *acb, struct DeviceCtlBlk *dcb,
|
|||||||
dprintkl(KERN_ERR, "srb_done: ERROR! Completed cmd with tmp_srb\n");
|
dprintkl(KERN_ERR, "srb_done: ERROR! Completed cmd with tmp_srb\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd->scsi_done(cmd);
|
scsi_done(cmd);
|
||||||
waiting_process_next(acb);
|
waiting_process_next(acb);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3367,7 +3365,7 @@ static void doing_srb_done(struct AdapterCtlBlk *acb, u8 did_flag,
|
|||||||
if (force) {
|
if (force) {
|
||||||
/* For new EH, we normally don't need to give commands back,
|
/* For new EH, we normally don't need to give commands back,
|
||||||
* as they all complete or all time out */
|
* as they all complete or all time out */
|
||||||
p->scsi_done(p);
|
scsi_done(p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!list_empty(&dcb->srb_going_list))
|
if (!list_empty(&dcb->srb_going_list))
|
||||||
@ -3394,7 +3392,7 @@ static void doing_srb_done(struct AdapterCtlBlk *acb, u8 did_flag,
|
|||||||
if (force) {
|
if (force) {
|
||||||
/* For new EH, we normally don't need to give commands back,
|
/* For new EH, we normally don't need to give commands back,
|
||||||
* as they all complete or all time out */
|
* as they all complete or all time out */
|
||||||
cmd->scsi_done(cmd);
|
scsi_done(cmd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!list_empty(&dcb->srb_waiting_list))
|
if (!list_empty(&dcb->srb_waiting_list))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user