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

scsi: ps3rom: Call scsi_done() directly

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

Link: https://lore.kernel.org/r/20211007202923.2174984-63-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
3ca2385a 7bc195c7

+2 -3
+2 -3
drivers/scsi/ps3rom.c
··· 209 209 int res; 210 210 211 211 priv->curr_cmd = cmd; 212 - cmd->scsi_done = done; 213 212 214 213 opcode = cmd->cmnd[0]; 215 214 /* ··· 236 237 scsi_build_sense(cmd, 0, ILLEGAL_REQUEST, 0, 0); 237 238 cmd->result = res; 238 239 priv->curr_cmd = NULL; 239 - cmd->scsi_done(cmd); 240 + scsi_done(cmd); 240 241 } 241 242 242 243 return 0; ··· 320 321 321 322 done: 322 323 priv->curr_cmd = NULL; 323 - cmd->scsi_done(cmd); 324 + scsi_done(cmd); 324 325 return IRQ_HANDLED; 325 326 } 326 327