scsi: aha152x: Call scsi_done() directly
authorBart Van Assche <bvanassche@acm.org>
Thu, 7 Oct 2021 20:28:14 +0000 (13:28 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sun, 17 Oct 2021 01:28:45 +0000 (21:28 -0400)
commit3ab3b151ff1257623002d5e9b90c67f3e61228f2
treeedd8714a57ff5e0fcc5a132b6d6e3a15a6263f96
parentf3bc9338e08de19f795b184a959c583195e1d6fd
scsi: aha152x: Call scsi_done() directly

Conditional statements are faster than indirect calls. Hence call
scsi_done() and reset_done() directly. The changes in this patch are as
follows:

 - Remove the 'done' argument from aha152x_internal_queue().

 - Change ptr->scsi_done(ptr) into aha152x_scsi_done(ptr).

 - Inside aha152x_scsi_done(), check the 'resetting' flag of SCp.phase
   since aha152x_internal_queue() specifies the 'reset_done' function
   pointer if and only if the third argument has the value 'resetting'.

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