Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: 3w-sas: Call scsi_done() directly

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

Link: https://lore.kernel.org/r/20211007202923.2174984-10-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bart Van Assche and committed by
Martin K. Petersen
2adf975e 3e6d3832

+2 -5
+2 -5
drivers/scsi/3w-sas.c
··· 1216 1216 1217 1217 /* Now complete the io */ 1218 1218 scsi_dma_unmap(cmd); 1219 - cmd->scsi_done(cmd); 1219 + scsi_done(cmd); 1220 1220 tw_dev->state[request_id] = TW_S_COMPLETED; 1221 1221 twl_free_request_id(tw_dev, request_id); 1222 1222 tw_dev->posted_request_count--; ··· 1369 1369 if (cmd) { 1370 1370 cmd->result = (DID_RESET << 16); 1371 1371 scsi_dma_unmap(cmd); 1372 - cmd->scsi_done(cmd); 1372 + scsi_done(cmd); 1373 1373 } 1374 1374 } 1375 1375 } ··· 1460 1460 retval = SCSI_MLQUEUE_HOST_BUSY; 1461 1461 goto out; 1462 1462 } 1463 - 1464 - /* Save done function into scsi_cmnd struct */ 1465 - SCpnt->scsi_done = done; 1466 1463 1467 1464 /* Get a free request id */ 1468 1465 twl_get_request_id(tw_dev, &request_id);