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

scsi: libfc: Call scsi_done() directly

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

Link: https://lore.kernel.org/r/20211007202923.2174984-44-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
e0f63b21 98cc0e69

+3 -3
+3 -3
drivers/scsi/libfc/fc_fcp.c
··· 1870 1870 rval = fc_remote_port_chkready(rport); 1871 1871 if (rval) { 1872 1872 sc_cmd->result = rval; 1873 - sc_cmd->scsi_done(sc_cmd); 1873 + scsi_done(sc_cmd); 1874 1874 return 0; 1875 1875 } 1876 1876 ··· 1880 1880 * online 1881 1881 */ 1882 1882 sc_cmd->result = DID_IMM_RETRY << 16; 1883 - sc_cmd->scsi_done(sc_cmd); 1883 + scsi_done(sc_cmd); 1884 1884 goto out; 1885 1885 } 1886 1886 ··· 2087 2087 list_del(&fsp->list); 2088 2088 sc_cmd->SCp.ptr = NULL; 2089 2089 spin_unlock_irqrestore(&si->scsi_queue_lock, flags); 2090 - sc_cmd->scsi_done(sc_cmd); 2090 + scsi_done(sc_cmd); 2091 2091 2092 2092 /* release ref from initial allocation in queue command */ 2093 2093 fc_fcp_pkt_release(fsp);