Skip to content

Commit

Permalink
scsi: target: Remove unused variable 'tpg'
Browse files Browse the repository at this point in the history
Gcc reports warning as follows:

drivers/target/target_core_pr.c:1162:26: warning:
 variable 'tpg' set but not used [-Wunused-but-set-variable]
 1162 |  struct se_portal_group *tpg;
      |                          ^~~

After commit 63c9ffe ("scsi: target: Check enforce_pr_isids during
registration"), 'tpg' is never used. Remove it to avoid build warning.

Link: https://lore.kernel.org/r/20200709114636.69256-1-weiyongjun1@huawei.com
Reported-by: Hulk Robot <hulkci@huawei.com>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Wei Yongjun authored and Martin K. Petersen committed Jul 14, 2020
1 parent 6edfdcf commit dd06a40
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/target/target_core_pr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,6 @@ static struct t10_pr_registration *__core_scsi3_locate_pr_reg(
{
struct t10_reservation *pr_tmpl = &dev->t10_pr;
struct t10_pr_registration *pr_reg, *pr_reg_tmp;
struct se_portal_group *tpg;

spin_lock(&pr_tmpl->registration_lock);
list_for_each_entry_safe(pr_reg, pr_reg_tmp,
Expand All @@ -1170,7 +1169,6 @@ static struct t10_pr_registration *__core_scsi3_locate_pr_reg(
if (pr_reg->pr_reg_nacl != nacl)
continue;

tpg = pr_reg->pr_reg_nacl->se_tpg;
/*
* If this registration does NOT contain a fabric provided
* ISID, then we have found a match.
Expand Down

0 comments on commit dd06a40

Please sign in to comment.