scsi: staging: rts5208: Call scsi_done() directly
Conditional statements are faster than indirect calls. Hence call scsi_done() directly. Link: https://lore.kernel.org/r/20211007204618.2196847-7-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:
parent
fd17badb66
commit
ae4ea859c0
@ -140,7 +140,6 @@ static int queuecommand_lck(struct scsi_cmnd *srb,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* enqueue the command and wake up the control thread */
|
/* enqueue the command and wake up the control thread */
|
||||||
srb->scsi_done = done;
|
|
||||||
chip->srb = srb;
|
chip->srb = srb;
|
||||||
complete(&dev->cmnd_ready);
|
complete(&dev->cmnd_ready);
|
||||||
|
|
||||||
@ -423,7 +422,7 @@ static int rtsx_control_thread(void *__dev)
|
|||||||
|
|
||||||
/* indicate that the command is done */
|
/* indicate that the command is done */
|
||||||
else if (chip->srb->result != DID_ABORT << 16) {
|
else if (chip->srb->result != DID_ABORT << 16) {
|
||||||
chip->srb->scsi_done(chip->srb);
|
scsi_done(chip->srb);
|
||||||
} else {
|
} else {
|
||||||
skip_for_abort:
|
skip_for_abort:
|
||||||
dev_err(&dev->pci->dev, "scsi command aborted\n");
|
dev_err(&dev->pci->dev, "scsi command aborted\n");
|
||||||
@ -635,7 +634,7 @@ static void quiesce_and_remove_host(struct rtsx_dev *dev)
|
|||||||
if (chip->srb) {
|
if (chip->srb) {
|
||||||
chip->srb->result = DID_NO_CONNECT << 16;
|
chip->srb->result = DID_NO_CONNECT << 16;
|
||||||
scsi_lock(host);
|
scsi_lock(host);
|
||||||
chip->srb->scsi_done(dev->chip->srb);
|
scsi_done(dev->chip->srb);
|
||||||
chip->srb = NULL;
|
chip->srb = NULL;
|
||||||
scsi_unlock(host);
|
scsi_unlock(host);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user