Commit 681fa525 authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

scsi: atp870u: Call scsi_done() directly

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

Link: https://lore.kernel.org/r/20211007202923.2174984-24-bvanassche@acm.orgSigned-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 3f0b59b6
...@@ -512,7 +512,7 @@ static irqreturn_t atp870u_intr_handle(int irq, void *dev_id) ...@@ -512,7 +512,7 @@ static irqreturn_t atp870u_intr_handle(int irq, void *dev_id)
scsi_dma_unmap(workreq); scsi_dma_unmap(workreq);
spin_lock_irqsave(dev->host->host_lock, flags); spin_lock_irqsave(dev->host->host_lock, flags);
(*workreq->scsi_done) (workreq); scsi_done(workreq);
#ifdef ED_DBGP #ifdef ED_DBGP
printk("workreq->scsi_done\n"); printk("workreq->scsi_done\n");
#endif #endif
...@@ -654,17 +654,6 @@ static int atp870u_queuecommand_lck(struct scsi_cmnd *req_p, ...@@ -654,17 +654,6 @@ static int atp870u_queuecommand_lck(struct scsi_cmnd *req_p,
return 0; return 0;
} }
if (done) {
req_p->scsi_done = done;
} else {
#ifdef ED_DBGP
printk( "atp870u_queuecommand: done can't be NULL\n");
#endif
req_p->result = 0;
done(req_p);
return 0;
}
/* /*
* Count new command * Count new command
*/ */
......
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