diff options
author | Jörn Engel <joern@logfs.org> | 2012-03-15 15:06:58 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-03-15 19:16:09 -0700 |
commit | 281689051a628e5341ce1efcfafde9d60f2f6fbb (patch) | |
tree | 15809410fe5d1c8540622f5bd7c726517b22ddd3 /drivers/target/target_core_pr.c | |
parent | f2083241f23722207676025abbb45a301d412e69 (diff) |
target: remove obvious warnings
Get rid of a bunch of write-only variables. In a number of cases I
suspect actual bugs to be present, so I left all of those for a second
look.
(nab: fix lio-core patch fuzz)
Signed-off-by: Joern Engel <joern@logfs.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_pr.c')
-rw-r--r-- | drivers/target/target_core_pr.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c index de3e4f2f60b..5926b171dba 100644 --- a/drivers/target/target_core_pr.c +++ b/drivers/target/target_core_pr.c @@ -2416,9 +2416,7 @@ static int core_scsi3_pro_reserve( u64 res_key) { struct se_session *se_sess = cmd->se_sess; - struct se_dev_entry *se_deve; struct se_lun *se_lun = cmd->se_lun; - struct se_portal_group *se_tpg; struct t10_pr_registration *pr_reg, *pr_res_holder; struct t10_reservation *pr_tmpl = &dev->se_sub_dev->t10_pr; char i_buf[PR_REG_ISID_ID_LEN]; @@ -2431,8 +2429,6 @@ static int core_scsi3_pro_reserve( cmd->scsi_sense_reason = TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE; return -EINVAL; } - se_tpg = se_sess->se_tpg; - se_deve = se_sess->se_node_acl->device_list[cmd->orig_fe_lun]; /* * Locate the existing *pr_reg via struct se_node_acl pointers */ @@ -2990,7 +2986,6 @@ static int core_scsi3_pro_preempt( int abort) { struct se_device *dev = cmd->se_dev; - struct se_dev_entry *se_deve; struct se_node_acl *pr_reg_nacl; struct se_session *se_sess = cmd->se_sess; LIST_HEAD(preempt_and_abort_list); @@ -3005,7 +3000,6 @@ static int core_scsi3_pro_preempt( return -EINVAL; } - se_deve = se_sess->se_node_acl->device_list[cmd->orig_fe_lun]; pr_reg_n = core_scsi3_locate_pr_reg(cmd->se_dev, se_sess->se_node_acl, se_sess); if (!pr_reg_n) { @@ -3341,7 +3335,7 @@ static int core_scsi3_emulate_pro_register_and_move( { struct se_session *se_sess = cmd->se_sess; struct se_device *dev = cmd->se_dev; - struct se_dev_entry *se_deve, *dest_se_deve = NULL; + struct se_dev_entry *dest_se_deve = NULL; struct se_lun *se_lun = cmd->se_lun; struct se_node_acl *pr_res_nacl, *pr_reg_nacl, *dest_node_acl = NULL; struct se_port *se_port; @@ -3366,7 +3360,6 @@ static int core_scsi3_emulate_pro_register_and_move( memset(i_buf, 0, PR_REG_ISID_ID_LEN); se_tpg = se_sess->se_tpg; tf_ops = se_tpg->se_tpg_tfo; - se_deve = se_sess->se_node_acl->device_list[cmd->orig_fe_lun]; /* * Follow logic from spc4r17 Section 5.7.8, Table 50 -- * Register behaviors for a REGISTER AND MOVE service action |