All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] scsi: target: Remove unused variable 'tpg'
@ 2020-07-09 11:46 ` Wei Yongjun
  0 siblings, 0 replies; 9+ messages in thread
From: Wei Yongjun @ 2020-07-09 11:46 UTC (permalink / raw)
  To: Hulk Robot, Martin K. Petersen; +Cc: Wei Yongjun, linux-scsi, target-devel

Gcc report 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 63c9ffe473d3 ("scsi: target: Check enforce_pr_isids
during registration"), 'tpg' is never used, so removing it to
avoid build warning.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/target/target_core_pr.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c
index 300b03b1b696..8fc88654bff6 100644
--- a/drivers/target/target_core_pr.c
+++ b/drivers/target/target_core_pr.c
@@ -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,
@@ -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.

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH -next] scsi: target: Remove unused variable 'tpg'
@ 2020-07-09 11:46 ` Wei Yongjun
  0 siblings, 0 replies; 9+ messages in thread
From: Wei Yongjun @ 2020-07-09 11:46 UTC (permalink / raw)
  To: Hulk Robot, Martin K. Petersen; +Cc: Wei Yongjun, linux-scsi, target-devel

Gcc report 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 63c9ffe473d3 ("scsi: target: Check enforce_pr_isids
during registration"), 'tpg' is never used, so removing it to
avoid build warning.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/target/target_core_pr.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c
index 300b03b1b696..8fc88654bff6 100644
--- a/drivers/target/target_core_pr.c
+++ b/drivers/target/target_core_pr.c
@@ -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,
@@ -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.


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH -next] scsi: target: Remove unused variable 'tpg'
  2020-07-09 11:46 ` Wei Yongjun
@ 2020-07-09 19:37   ` Mike Christie
  -1 siblings, 0 replies; 9+ messages in thread
From: Mike Christie @ 2020-07-09 19:37 UTC (permalink / raw)
  To: Wei Yongjun, Hulk Robot, Martin K. Petersen; +Cc: linux-scsi, target-devel

On 7/9/20 6:46 AM, Wei Yongjun wrote:
> Gcc report 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 63c9ffe473d3 ("scsi: target: Check enforce_pr_isids
> during registration"), 'tpg' is never used, so removing it to
> avoid build warning.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/target/target_core_pr.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c
> index 300b03b1b696..8fc88654bff6 100644
> --- a/drivers/target/target_core_pr.c
> +++ b/drivers/target/target_core_pr.c
> @@ -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,
> @@ -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.
> 

Sorry. That was my fault. Thanks.

Reviewed-by: Mike Christie <michael.christie@oracle.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH -next] scsi: target: Remove unused variable 'tpg'
@ 2020-07-09 19:37   ` Mike Christie
  0 siblings, 0 replies; 9+ messages in thread
From: Mike Christie @ 2020-07-09 19:37 UTC (permalink / raw)
  To: Wei Yongjun, Hulk Robot, Martin K. Petersen; +Cc: linux-scsi, target-devel

On 7/9/20 6:46 AM, Wei Yongjun wrote:
> Gcc report 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 63c9ffe473d3 ("scsi: target: Check enforce_pr_isids
> during registration"), 'tpg' is never used, so removing it to
> avoid build warning.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/target/target_core_pr.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c
> index 300b03b1b696..8fc88654bff6 100644
> --- a/drivers/target/target_core_pr.c
> +++ b/drivers/target/target_core_pr.c
> @@ -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,
> @@ -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.
> 

Sorry. That was my fault. Thanks.

Reviewed-by: Mike Christie <michael.christie@oracle.com>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH -next] scsi: target: Remove unused variable 'tpg'
  2020-07-09 11:46 ` Wei Yongjun
  (?)
  (?)
@ 2020-07-11 18:28 ` Chaitanya Kulkarni
  -1 siblings, 0 replies; 9+ messages in thread
From: Chaitanya Kulkarni @ 2020-07-11 18:28 UTC (permalink / raw)
  To: Wei Yongjun, Hulk Robot, Martin K. Petersen; +Cc: linux-scsi, target-devel

On 7/9/20 04:36, Wei Yongjun wrote:
> Gcc report 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 63c9ffe473d3 ("scsi: target: Check enforce_pr_isids
> during registration"), 'tpg' is never used, so removing it to
> avoid build warning.
> 
> Reported-by: Hulk Robot<hulkci@huawei.com>
> Signed-off-by: Wei Yongjun<weiyongjun1@huawei.com>

Looks good to me.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH -next] scsi: target: Remove unused variable 'tpg'
  2020-07-09 11:46 ` Wei Yongjun
@ 2020-07-13 17:05   ` Himanshu Madhani
  -1 siblings, 0 replies; 9+ messages in thread
From: Himanshu Madhani @ 2020-07-13 17:05 UTC (permalink / raw)
  To: Wei Yongjun, Hulk Robot, Martin K. Petersen; +Cc: linux-scsi, target-devel



On 7/9/20 6:46 AM, Wei Yongjun wrote:
> Gcc report 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 63c9ffe473d3 ("scsi: target: Check enforce_pr_isids
> during registration"), 'tpg' is never used, so removing it to
> avoid build warning.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>   drivers/target/target_core_pr.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c
> index 300b03b1b696..8fc88654bff6 100644
> --- a/drivers/target/target_core_pr.c
> +++ b/drivers/target/target_core_pr.c
> @@ -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,
> @@ -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.
> 
Looks Good.

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

-- 
Himanshu Madhani                     Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH -next] scsi: target: Remove unused variable 'tpg'
@ 2020-07-13 17:05   ` Himanshu Madhani
  0 siblings, 0 replies; 9+ messages in thread
From: Himanshu Madhani @ 2020-07-13 17:05 UTC (permalink / raw)
  To: Wei Yongjun, Hulk Robot, Martin K. Petersen; +Cc: linux-scsi, target-devel



On 7/9/20 6:46 AM, Wei Yongjun wrote:
> Gcc report 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 63c9ffe473d3 ("scsi: target: Check enforce_pr_isids
> during registration"), 'tpg' is never used, so removing it to
> avoid build warning.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>   drivers/target/target_core_pr.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c
> index 300b03b1b696..8fc88654bff6 100644
> --- a/drivers/target/target_core_pr.c
> +++ b/drivers/target/target_core_pr.c
> @@ -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,
> @@ -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.
> 
Looks Good.

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

-- 
Himanshu Madhani                     Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH -next] scsi: target: Remove unused variable 'tpg'
  2020-07-09 11:46 ` Wei Yongjun
@ 2020-07-14  4:58   ` Martin K. Petersen
  -1 siblings, 0 replies; 9+ messages in thread
From: Martin K. Petersen @ 2020-07-14  4:58 UTC (permalink / raw)
  To: Wei Yongjun, Hulk Robot; +Cc: Martin K . Petersen, linux-scsi, target-devel

On Thu, 9 Jul 2020 19:46:36 +0800, Wei Yongjun wrote:

> Gcc report 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;
>       |                          ^~~
> 
> [...]

Applied to 5.9/scsi-queue, thanks!

[1/1] scsi: target: Remove unused variable 'tpg'
      https://git.kernel.org/mkp/scsi/c/dd06a40201fe

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH -next] scsi: target: Remove unused variable 'tpg'
@ 2020-07-14  4:58   ` Martin K. Petersen
  0 siblings, 0 replies; 9+ messages in thread
From: Martin K. Petersen @ 2020-07-14  4:58 UTC (permalink / raw)
  To: Wei Yongjun, Hulk Robot; +Cc: Martin K . Petersen, linux-scsi, target-devel

On Thu, 9 Jul 2020 19:46:36 +0800, Wei Yongjun wrote:

> Gcc report 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;
>       |                          ^~~
> 
> [...]

Applied to 5.9/scsi-queue, thanks!

[1/1] scsi: target: Remove unused variable 'tpg'
      https://git.kernel.org/mkp/scsi/c/dd06a40201fe

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-07-14  4:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-09 11:46 [PATCH -next] scsi: target: Remove unused variable 'tpg' Wei Yongjun
2020-07-09 11:46 ` Wei Yongjun
2020-07-09 19:37 ` Mike Christie
2020-07-09 19:37   ` Mike Christie
2020-07-11 18:28 ` Chaitanya Kulkarni
2020-07-13 17:05 ` Himanshu Madhani
2020-07-13 17:05   ` Himanshu Madhani
2020-07-14  4:58 ` Martin K. Petersen
2020-07-14  4:58   ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.