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

scsi: hptiop: Call scsi_done() directly

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

Link: https://lore.kernel.org/r/20211007202923.2174984-38-bvanassche@acm.orgSigned-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 82f01edc
...@@ -769,7 +769,7 @@ static void hptiop_finish_scsi_req(struct hptiop_hba *hba, u32 tag, ...@@ -769,7 +769,7 @@ static void hptiop_finish_scsi_req(struct hptiop_hba *hba, u32 tag,
skip_resid: skip_resid:
dprintk("scsi_done(%p)\n", scp); dprintk("scsi_done(%p)\n", scp);
scp->scsi_done(scp); scsi_done(scp);
free_req(hba, &hba->reqs[tag]); free_req(hba, &hba->reqs[tag]);
} }
...@@ -1002,9 +1002,6 @@ static int hptiop_queuecommand_lck(struct scsi_cmnd *scp, ...@@ -1002,9 +1002,6 @@ static int hptiop_queuecommand_lck(struct scsi_cmnd *scp,
int sg_count = 0; int sg_count = 0;
struct hptiop_request *_req; struct hptiop_request *_req;
BUG_ON(!done);
scp->scsi_done = done;
_req = get_req(hba); _req = get_req(hba);
if (_req == NULL) { if (_req == NULL) {
dprintk("hptiop_queuecmd : no free req\n"); dprintk("hptiop_queuecmd : no free req\n");
...@@ -1059,7 +1056,7 @@ static int hptiop_queuecommand_lck(struct scsi_cmnd *scp, ...@@ -1059,7 +1056,7 @@ static int hptiop_queuecommand_lck(struct scsi_cmnd *scp,
cmd_done: cmd_done:
dprintk("scsi_done(scp=%p)\n", scp); dprintk("scsi_done(scp=%p)\n", scp);
scp->scsi_done(scp); scsi_done(scp);
return 0; return 0;
} }
......
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