Commit af049dfd authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen
Browse files

scsi: core: Remove the 'done' argument from SCSI queuecommand_lck functions

The DEF_SCSI_QCMD() macro passes the addresses of the SCSI host lock and
also that of the scsi_done function to the queuecommand_lck() function
implementations. Remove the 'scsi_done' argument since its address is
now a constant and instead call 'scsi_done' directly from inside the
queuecommand_lck() functions.

Link: https://lore.kernel.org/r/20211007204618.2196847-14-bvanassche@acm.org


Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 0feb3429
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1744,8 +1744,9 @@ static int twa_scsi_eh_reset(struct scsi_cmnd *SCpnt)
} /* End twa_scsi_eh_reset() */

/* This is the main scsi queue function to handle scsi opcodes */
static int twa_scsi_queue_lck(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
static int twa_scsi_queue_lck(struct scsi_cmnd *SCpnt)
{
	void (*done)(struct scsi_cmnd *) = scsi_done;
	int request_id, retval;
	TW_Device_Extension *tw_dev = (TW_Device_Extension *)SCpnt->device->host->hostdata;

+2 −1
Original line number Diff line number Diff line
@@ -1450,8 +1450,9 @@ static int twl_scsi_eh_reset(struct scsi_cmnd *SCpnt)
} /* End twl_scsi_eh_reset() */

/* This is the main scsi queue function to handle scsi opcodes */
static int twl_scsi_queue_lck(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
static int twl_scsi_queue_lck(struct scsi_cmnd *SCpnt)
{
	void (*done)(struct scsi_cmnd *) = scsi_done;
	int request_id, retval;
	TW_Device_Extension *tw_dev = (TW_Device_Extension *)SCpnt->device->host->hostdata;

+2 −1
Original line number Diff line number Diff line
@@ -1918,8 +1918,9 @@ static int tw_scsiop_test_unit_ready_complete(TW_Device_Extension *tw_dev, int r
} /* End tw_scsiop_test_unit_ready_complete() */

/* This is the main scsi queue function to handle scsi opcodes */
static int tw_scsi_queue_lck(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
static int tw_scsi_queue_lck(struct scsi_cmnd *SCpnt)
{
	void (*done)(struct scsi_cmnd *) = scsi_done;
	unsigned char *command = SCpnt->cmnd;
	int request_id = 0;
	int retval = 1;
+1 −2
Original line number Diff line number Diff line
@@ -1751,8 +1751,7 @@ NCR_700_intr(int irq, void *dev_id)
	return IRQ_RETVAL(handled);
}

static int
NCR_700_queuecommand_lck(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *))
static int NCR_700_queuecommand_lck(struct scsi_cmnd *SCp)
{
	struct NCR_700_Host_Parameters *hostdata = 
		(struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0];
+2 −2
Original line number Diff line number Diff line
@@ -2866,9 +2866,9 @@ static int blogic_hostreset(struct scsi_cmnd *SCpnt)
  Outgoing Mailbox for execution by the associated Host Adapter.
*/

static int blogic_qcmd_lck(struct scsi_cmnd *command,
		void (*comp_cb) (struct scsi_cmnd *))
static int blogic_qcmd_lck(struct scsi_cmnd *command)
{
	void (*comp_cb)(struct scsi_cmnd *) = scsi_done;
	struct blogic_adapter *adapter =
		(struct blogic_adapter *) command->device->host->hostdata;
	struct blogic_tgt_flags *tgt_flags =
Loading