diff mbox series

[22/34] qla2xxx: Remove qla_tgt_cmd.released

Message ID 20190417214443.243152-23-bvanassche@acm.org (mailing list archive)
State Mainlined
Commit 4c374596d7eb80a901c8adc532ae9760e9df9fde
Headers show
Series qla2xxx source code cleanup and bug fixes | expand

Commit Message

Bart Van Assche April 17, 2019, 9:44 p.m. UTC
Since the previous patch removed the only statement that sets
qla_tgt_cmd.released, remove the code that depends on that member
variable being set and the member variable itself.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/scsi/qla2xxx/qla_target.h  |  1 -
 drivers/scsi/qla2xxx/tcm_qla2xxx.c | 15 +--------------
 2 files changed, 1 insertion(+), 15 deletions(-)
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_target.h b/drivers/scsi/qla2xxx/qla_target.h
index 8fb197a4d740..262fc33fb473 100644
--- a/drivers/scsi/qla2xxx/qla_target.h
+++ b/drivers/scsi/qla2xxx/qla_target.h
@@ -889,7 +889,6 @@  struct qla_tgt_cmd {
 	unsigned int term_exchg:1;
 	unsigned int cmd_sent_to_fw:1;
 	unsigned int cmd_in_wq:1;
-	unsigned int released:1;
 
 	/*
 	 * This variable may be set from outside the LIO and I/O completion
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
index 4fcae1af2d63..f6797eed320a 100644
--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
@@ -262,7 +262,6 @@  static void tcm_qla2xxx_free_mcmd(struct qla_tgt_mgmt_cmd *mcmd)
 static void tcm_qla2xxx_complete_free(struct work_struct *work)
 {
 	struct qla_tgt_cmd *cmd = container_of(work, struct qla_tgt_cmd, work);
-	bool released = false;
 	unsigned long flags;
 
 	cmd->cmd_in_wq = 0;
@@ -273,14 +272,9 @@  static void tcm_qla2xxx_complete_free(struct work_struct *work)
 	cmd->qpair->tgt_counters.qla_core_ret_sta_ctio++;
 	cmd->trc_flags |= TRC_CMD_FREE;
 	cmd->cmd_sent_to_fw = 0;
-	if (cmd->released)
-		released = true;
 	spin_unlock_irqrestore(&cmd->cmd_lock, flags);
 
-	if (released)
-		qlt_free_cmd(cmd);
-	else
-		transport_generic_free_cmd(&cmd->se_cmd, 0);
+	transport_generic_free_cmd(&cmd->se_cmd, 0);
 }
 
 /*
@@ -490,13 +484,6 @@  static void tcm_qla2xxx_handle_data_work(struct work_struct *work)
 
 	spin_lock_irqsave(&cmd->cmd_lock, flags);
 	cmd->cmd_sent_to_fw = 0;
-
-	if (cmd->released) {
-		spin_unlock_irqrestore(&cmd->cmd_lock, flags);
-		qlt_free_cmd(cmd);
-		return;
-	}
-
 	if (cmd->aborted) {
 		spin_unlock_irqrestore(&cmd->cmd_lock, flags);