projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70a5caf
)
scsi: stex: Call scsi_done() directly
author
Bart Van Assche
<bvanassche@acm.org>
Thu, 7 Oct 2021 20:29:07 +0000
(13:29 -0700)
committer
Martin K. Petersen
<martin.petersen@oracle.com>
Sun, 17 Oct 2021 01:31:42 +0000
(21:31 -0400)
Conditional statements are faster than indirect calls. Hence call
scsi_done() directly.
Link:
https://lore.kernel.org/r/20211007202923.2174984-73-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/stex.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/stex.c
b/drivers/scsi/stex.c
index f1ba7f5b52a895517fafd53dbfb0a95a2a52d803..2f96a2fdaa405b2118b49cb9fa2c21c8fb1c2bf3 100644
(file)
--- a/
drivers/scsi/stex.c
+++ b/
drivers/scsi/stex.c
@@
-574,7
+574,7
@@
static void return_abnormal_state(struct st_hba *hba, int status)
if (ccb->cmd) {
scsi_dma_unmap(ccb->cmd);
ccb->cmd->result = status << 16;
-
ccb->cmd->
scsi_done(ccb->cmd);
+ scsi_done(ccb->cmd);
ccb->cmd = NULL;
}
}
@@
-688,8
+688,6
@@
stex_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
break;
}
- cmd->scsi_done = done;
-
tag = scsi_cmd_to_rq(cmd)->tag;
if (unlikely(tag >= host->can_queue))
@@
-764,7
+762,7
@@
static void stex_scsi_done(struct st_ccb *ccb)
}
cmd->result = result;
-
cmd->
scsi_done(cmd);
+ scsi_done(cmd);
}
static void stex_copy_data(struct st_ccb *ccb,