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 22:16:09 -0400 |
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 de3e4f2f60bd..5926b171dba0 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( | |||
2416 | u64 res_key) | 2416 | u64 res_key) |
2417 | { | 2417 | { |
2418 | struct se_session *se_sess = cmd->se_sess; | 2418 | struct se_session *se_sess = cmd->se_sess; |
2419 | struct se_dev_entry *se_deve; | ||
2420 | struct se_lun *se_lun = cmd->se_lun; | 2419 | struct se_lun *se_lun = cmd->se_lun; |
2421 | struct se_portal_group *se_tpg; | ||
2422 | struct t10_pr_registration *pr_reg, *pr_res_holder; | 2420 | struct t10_pr_registration *pr_reg, *pr_res_holder; |
2423 | struct t10_reservation *pr_tmpl = &dev->se_sub_dev->t10_pr; | 2421 | struct t10_reservation *pr_tmpl = &dev->se_sub_dev->t10_pr; |
2424 | char i_buf[PR_REG_ISID_ID_LEN]; | 2422 | char i_buf[PR_REG_ISID_ID_LEN]; |
@@ -2431,8 +2429,6 @@ static int core_scsi3_pro_reserve( | |||
2431 | cmd->scsi_sense_reason = TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE; | 2429 | cmd->scsi_sense_reason = TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE; |
2432 | return -EINVAL; | 2430 | return -EINVAL; |
2433 | } | 2431 | } |
2434 | se_tpg = se_sess->se_tpg; | ||
2435 | se_deve = se_sess->se_node_acl->device_list[cmd->orig_fe_lun]; | ||
2436 | /* | 2432 | /* |
2437 | * Locate the existing *pr_reg via struct se_node_acl pointers | 2433 | * Locate the existing *pr_reg via struct se_node_acl pointers |
2438 | */ | 2434 | */ |
@@ -2990,7 +2986,6 @@ static int core_scsi3_pro_preempt( | |||
2990 | int abort) | 2986 | int abort) |
2991 | { | 2987 | { |
2992 | struct se_device *dev = cmd->se_dev; | 2988 | struct se_device *dev = cmd->se_dev; |
2993 | struct se_dev_entry *se_deve; | ||
2994 | struct se_node_acl *pr_reg_nacl; | 2989 | struct se_node_acl *pr_reg_nacl; |
2995 | struct se_session *se_sess = cmd->se_sess; | 2990 | struct se_session *se_sess = cmd->se_sess; |
2996 | LIST_HEAD(preempt_and_abort_list); | 2991 | LIST_HEAD(preempt_and_abort_list); |
@@ -3005,7 +3000,6 @@ static int core_scsi3_pro_preempt( | |||
3005 | return -EINVAL; | 3000 | return -EINVAL; |
3006 | } | 3001 | } |
3007 | 3002 | ||
3008 | se_deve = se_sess->se_node_acl->device_list[cmd->orig_fe_lun]; | ||
3009 | pr_reg_n = core_scsi3_locate_pr_reg(cmd->se_dev, se_sess->se_node_acl, | 3003 | pr_reg_n = core_scsi3_locate_pr_reg(cmd->se_dev, se_sess->se_node_acl, |
3010 | se_sess); | 3004 | se_sess); |
3011 | if (!pr_reg_n) { | 3005 | if (!pr_reg_n) { |
@@ -3341,7 +3335,7 @@ static int core_scsi3_emulate_pro_register_and_move( | |||
3341 | { | 3335 | { |
3342 | struct se_session *se_sess = cmd->se_sess; | 3336 | struct se_session *se_sess = cmd->se_sess; |
3343 | struct se_device *dev = cmd->se_dev; | 3337 | struct se_device *dev = cmd->se_dev; |
3344 | struct se_dev_entry *se_deve, *dest_se_deve = NULL; | 3338 | struct se_dev_entry *dest_se_deve = NULL; |
3345 | struct se_lun *se_lun = cmd->se_lun; | 3339 | struct se_lun *se_lun = cmd->se_lun; |
3346 | struct se_node_acl *pr_res_nacl, *pr_reg_nacl, *dest_node_acl = NULL; | 3340 | struct se_node_acl *pr_res_nacl, *pr_reg_nacl, *dest_node_acl = NULL; |
3347 | struct se_port *se_port; | 3341 | struct se_port *se_port; |
@@ -3366,7 +3360,6 @@ static int core_scsi3_emulate_pro_register_and_move( | |||
3366 | memset(i_buf, 0, PR_REG_ISID_ID_LEN); | 3360 | memset(i_buf, 0, PR_REG_ISID_ID_LEN); |
3367 | se_tpg = se_sess->se_tpg; | 3361 | se_tpg = se_sess->se_tpg; |
3368 | tf_ops = se_tpg->se_tpg_tfo; | 3362 | tf_ops = se_tpg->se_tpg_tfo; |
3369 | se_deve = se_sess->se_node_acl->device_list[cmd->orig_fe_lun]; | ||
3370 | /* | 3363 | /* |
3371 | * Follow logic from spc4r17 Section 5.7.8, Table 50 -- | 3364 | * Follow logic from spc4r17 Section 5.7.8, Table 50 -- |
3372 | * Register behaviors for a REGISTER AND MOVE service action | 3365 | * Register behaviors for a REGISTER AND MOVE service action |