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

scsi: megaraid_mbox: Call scsi_done() directly

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

Link: https://lore.kernel.org/r/20211007202923.2174984-49-bvanassche@acm.orgSigned-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent c0e70ea3
...@@ -1440,7 +1440,6 @@ megaraid_queue_command_lck(struct scsi_cmnd *scp, void (*done)(struct scsi_cmnd ...@@ -1440,7 +1440,6 @@ megaraid_queue_command_lck(struct scsi_cmnd *scp, void (*done)(struct scsi_cmnd
int if_busy; int if_busy;
adapter = SCP2ADAPTER(scp); adapter = SCP2ADAPTER(scp);
scp->scsi_done = done;
scp->result = 0; scp->result = 0;
/* /*
...@@ -2358,7 +2357,7 @@ megaraid_mbox_dpc(unsigned long devp) ...@@ -2358,7 +2357,7 @@ megaraid_mbox_dpc(unsigned long devp)
megaraid_dealloc_scb(adapter, scb); megaraid_dealloc_scb(adapter, scb);
// send the scsi packet back to kernel // send the scsi packet back to kernel
scp->scsi_done(scp); scsi_done(scp);
} }
return; return;
...@@ -2416,7 +2415,7 @@ megaraid_abort_handler(struct scsi_cmnd *scp) ...@@ -2416,7 +2415,7 @@ megaraid_abort_handler(struct scsi_cmnd *scp)
scb->sno, scb->dev_channel, scb->dev_target)); scb->sno, scb->dev_channel, scb->dev_target));
scp->result = (DID_ABORT << 16); scp->result = (DID_ABORT << 16);
scp->scsi_done(scp); scsi_done(scp);
megaraid_dealloc_scb(adapter, scb); megaraid_dealloc_scb(adapter, scb);
...@@ -2446,7 +2445,7 @@ megaraid_abort_handler(struct scsi_cmnd *scp) ...@@ -2446,7 +2445,7 @@ megaraid_abort_handler(struct scsi_cmnd *scp)
scb->dev_channel, scb->dev_target)); scb->dev_channel, scb->dev_target));
scp->result = (DID_ABORT << 16); scp->result = (DID_ABORT << 16);
scp->scsi_done(scp); scsi_done(scp);
megaraid_dealloc_scb(adapter, scb); megaraid_dealloc_scb(adapter, scb);
...@@ -2566,7 +2565,7 @@ megaraid_reset_handler(struct scsi_cmnd *scp) ...@@ -2566,7 +2565,7 @@ megaraid_reset_handler(struct scsi_cmnd *scp)
} }
scb->scp->result = (DID_RESET << 16); scb->scp->result = (DID_RESET << 16);
scb->scp->scsi_done(scb->scp); scsi_done(scb->scp);
megaraid_dealloc_scb(adapter, scb); megaraid_dealloc_scb(adapter, scb);
} }
......
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