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

scsi: storvsc_drv: Call scsi_done() directly

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

Link: https://lore.kernel.org/r/20211007202923.2174984-74-bvanassche@acm.org
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
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
0c31fa0e 4acf838e

+2 -2
+2 -2
drivers/scsi/storvsc_drv.c
··· 1154 1154 scsi_set_resid(scmnd, 1155 1155 cmd_request->payload->range.len - data_transfer_length); 1156 1156 1157 - scmnd->scsi_done(scmnd); 1157 + scsi_done(scmnd); 1158 1158 1159 1159 if (payload_sz > 1160 1160 sizeof(struct vmbus_channel_packet_multipage_buffer)) ··· 1753 1753 * future versions of the host. 1754 1754 */ 1755 1755 if (!storvsc_scsi_cmd_ok(scmnd)) { 1756 - scmnd->scsi_done(scmnd); 1756 + scsi_done(scmnd); 1757 1757 return 0; 1758 1758 } 1759 1759 }