scsi: staging: unisys: visorhba: Call scsi_done() directly
Conditional statements are faster than indirect calls. Hence call scsi_done() directly. Link: https://lore.kernel.org/r/20211007204618.2196847-8-bvanassche@acm.org Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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:
Родитель
ae4ea859c0
Коммит
4879f233b4
|
@ -327,7 +327,7 @@ static int visorhba_abort_handler(struct scsi_cmnd *scsicmd)
|
|||
rtn = forward_taskmgmt_command(TASK_MGMT_ABORT_TASK, scsidev);
|
||||
if (rtn == SUCCESS) {
|
||||
scsicmd->result = DID_ABORT << 16;
|
||||
scsicmd->scsi_done(scsicmd);
|
||||
scsi_done(scsicmd);
|
||||
}
|
||||
return rtn;
|
||||
}
|
||||
|
@ -354,7 +354,7 @@ static int visorhba_device_reset_handler(struct scsi_cmnd *scsicmd)
|
|||
rtn = forward_taskmgmt_command(TASK_MGMT_LUN_RESET, scsidev);
|
||||
if (rtn == SUCCESS) {
|
||||
scsicmd->result = DID_RESET << 16;
|
||||
scsicmd->scsi_done(scsicmd);
|
||||
scsi_done(scsicmd);
|
||||
}
|
||||
return rtn;
|
||||
}
|
||||
|
@ -383,7 +383,7 @@ static int visorhba_bus_reset_handler(struct scsi_cmnd *scsicmd)
|
|||
rtn = forward_taskmgmt_command(TASK_MGMT_BUS_RESET, scsidev);
|
||||
if (rtn == SUCCESS) {
|
||||
scsicmd->result = DID_RESET << 16;
|
||||
scsicmd->scsi_done(scsicmd);
|
||||
scsi_done(scsicmd);
|
||||
}
|
||||
return rtn;
|
||||
}
|
||||
|
@ -476,8 +476,7 @@ static int visorhba_queue_command_lck(struct scsi_cmnd *scsicmd,
|
|||
*/
|
||||
cmdrsp->scsi.handle = insert_location;
|
||||
|
||||
/* save done function that we have call when cmd is complete */
|
||||
scsicmd->scsi_done = visorhba_cmnd_done;
|
||||
WARN_ON_ONCE(visorhba_cmnd_done != scsi_done);
|
||||
/* save destination */
|
||||
cmdrsp->scsi.vdest.channel = scsidev->channel;
|
||||
cmdrsp->scsi.vdest.id = scsidev->id;
|
||||
|
@ -686,8 +685,7 @@ static void visorhba_serverdown_complete(struct visorhba_devdata *devdata)
|
|||
case CMD_SCSI_TYPE:
|
||||
scsicmd = pendingdel->sent;
|
||||
scsicmd->result = DID_RESET << 16;
|
||||
if (scsicmd->scsi_done)
|
||||
scsicmd->scsi_done(scsicmd);
|
||||
scsi_done(scsicmd);
|
||||
break;
|
||||
case CMD_SCSITASKMGMT_TYPE:
|
||||
cmdrsp = pendingdel->sent;
|
||||
|
@ -853,7 +851,7 @@ static void complete_scsi_command(struct uiscmdrsp *cmdrsp,
|
|||
else
|
||||
do_scsi_nolinuxstat(cmdrsp, scsicmd);
|
||||
|
||||
scsicmd->scsi_done(scsicmd);
|
||||
scsi_done(scsicmd);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Загрузка…
Ссылка в новой задаче