Commit 2d1609af authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

scsi: qla1280: Call scsi_done() directly

Conditional statements are faster than indirect calls. Hence call
scsi_done() directly.

Link: https://lore.kernel.org/r/20211007202923.2174984-65-bvanassche@acm.orgSigned-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent ef697683
...@@ -697,7 +697,6 @@ qla1280_queuecommand_lck(struct scsi_cmnd *cmd, void (*fn)(struct scsi_cmnd *)) ...@@ -697,7 +697,6 @@ qla1280_queuecommand_lck(struct scsi_cmnd *cmd, void (*fn)(struct scsi_cmnd *))
struct srb *sp = (struct srb *)CMD_SP(cmd); struct srb *sp = (struct srb *)CMD_SP(cmd);
int status; int status;
cmd->scsi_done = fn;
sp->cmd = cmd; sp->cmd = cmd;
sp->flags = 0; sp->flags = 0;
sp->wait = NULL; sp->wait = NULL;
...@@ -755,7 +754,7 @@ _qla1280_wait_for_single_command(struct scsi_qla_host *ha, struct srb *sp, ...@@ -755,7 +754,7 @@ _qla1280_wait_for_single_command(struct scsi_qla_host *ha, struct srb *sp,
sp->wait = NULL; sp->wait = NULL;
if(CMD_HANDLE(cmd) == COMPLETED_HANDLE) { if(CMD_HANDLE(cmd) == COMPLETED_HANDLE) {
status = SUCCESS; status = SUCCESS;
(*cmd->scsi_done)(cmd); scsi_done(cmd);
} }
return status; return status;
} }
...@@ -1277,7 +1276,7 @@ qla1280_done(struct scsi_qla_host *ha) ...@@ -1277,7 +1276,7 @@ qla1280_done(struct scsi_qla_host *ha)
ha->actthreads--; ha->actthreads--;
if (sp->wait == NULL) if (sp->wait == NULL)
(*(cmd)->scsi_done)(cmd); scsi_done(cmd);
else else
complete(sp->wait); complete(sp->wait);
} }
......
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