[PATCH 1/4] target: Remove loop_id from qla_tgt_make_local_sess() arguments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The parameter was never used by callers and the passed value was never
used by callee.  Turn it into a local variable of the callee instead.

Signed-off-by: Joern Engel <joern@xxxxxxxxx>
---
 drivers/scsi/qla2xxx/qla_target.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c
index 94d0aaa..436d5a7 100644
--- a/drivers/scsi/qla2xxx/qla_target.c
+++ b/drivers/scsi/qla2xxx/qla_target.c
@@ -2522,7 +2522,7 @@ static inline int qla_tgt_get_fcp_task_attr(uint8_t task_codes)
 }
 
 static struct qla_tgt_sess *qla_tgt_make_local_sess(struct scsi_qla_host *,
-					uint8_t *, uint16_t);
+					uint8_t *);
 /*
  * Process context for I/O path into tcm_qla2xxx code
  */
@@ -2544,12 +2544,11 @@ static void qla_tgt_do_work(struct work_struct *work)
 
 	if (!sess) {
 		uint8_t *s_id = NULL;
-		uint16_t loop_id = 0;
 
 		s_id = atio->u.isp24.fcp_hdr.s_id;
 
 		mutex_lock(&ha->tgt_mutex);
-		cmd->sess = sess = qla_tgt_make_local_sess(vha, s_id, loop_id);
+		cmd->sess = sess = qla_tgt_make_local_sess(vha, s_id);
 		/* sess has got an extra creation ref */
 		mutex_unlock(&ha->tgt_mutex);
 
@@ -3902,12 +3901,13 @@ static fc_port_t *qla_tgt_get_port_database(struct scsi_qla_host *vha,
 
 /* Must be called under tgt_mutex */
 static struct qla_tgt_sess *qla_tgt_make_local_sess(struct scsi_qla_host *vha,
-	uint8_t *s_id, uint16_t loop_id)
+	uint8_t *s_id)
 {
 	struct qla_hw_data *ha = vha->hw;
 	struct qla_tgt_sess *sess = NULL;
 	fc_port_t *fcport = NULL;
 	int rc, global_resets;
+	uint16_t loop_id;
 
 retry:
 	global_resets = atomic_read(&ha->qla_tgt->tgt_global_resets_count);
@@ -3959,7 +3959,7 @@ static void qla_tgt_abort_work(struct qla_tgt *tgt,
 	uint32_t be_s_id;
 	uint8_t *s_id = NULL; /* to hide compiler warnings */
 	uint8_t local_s_id[3];
-	int rc, loop_id = -1; /* to hide compiler warnings */
+	int rc;
 
 	spin_lock_irqsave(&ha->hardware_lock, flags);
 
@@ -3986,7 +3986,7 @@ static void qla_tgt_abort_work(struct qla_tgt *tgt,
 		spin_unlock_irqrestore(&ha->hardware_lock, flags);
 
 		mutex_lock(&ha->tgt_mutex);
-		sess = qla_tgt_make_local_sess(vha, s_id, loop_id);
+		sess = qla_tgt_make_local_sess(vha, s_id);
 		/* sess has got an extra creation ref */
 		mutex_unlock(&ha->tgt_mutex);
 
@@ -4024,7 +4024,7 @@ static void qla_tgt_tmr_work(struct qla_tgt *tgt,
 	struct qla_tgt_sess *sess = NULL;
 	unsigned long flags;
 	uint8_t *s_id = NULL; /* to hide compiler warnings */
-	int rc, loop_id = -1; /* to hide compiler warnings */
+	int rc;
 	uint32_t lun, unpacked_lun;
 	int lun_size, fn;
 	void *iocb;
@@ -4044,7 +4044,7 @@ static void qla_tgt_tmr_work(struct qla_tgt *tgt,
 		spin_unlock_irqrestore(&ha->hardware_lock, flags);
 
 		mutex_lock(&ha->tgt_mutex);
-		sess = qla_tgt_make_local_sess(vha, s_id, loop_id);
+		sess = qla_tgt_make_local_sess(vha, s_id);
 		/* sess has got an extra creation ref */
 		mutex_unlock(&ha->tgt_mutex);
 
-- 
1.7.9

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux