Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: libsas: Call scsi_done() directly

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

Link: https://lore.kernel.org/r/20211007202923.2174984-46-bvanassche@acm.org
Reviewed-by: John Garry <john.garry@huawei.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bart Van Assche and committed by
Martin K. Petersen
e803bc52 b4b84edc

+2 -2
+2 -2
drivers/scsi/libsas/sas_scsi_host.c
··· 125 125 } 126 126 127 127 sas_end_task(sc, task); 128 - sc->scsi_done(sc); 128 + scsi_done(sc); 129 129 } 130 130 131 131 static struct sas_task *sas_create_task(struct scsi_cmnd *cmd, ··· 198 198 else 199 199 cmd->result = DID_ERROR << 16; 200 200 out_done: 201 - cmd->scsi_done(cmd); 201 + scsi_done(cmd); 202 202 return 0; 203 203 } 204 204 EXPORT_SYMBOL_GPL(sas_queuecommand);