kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] cxgbit: remove set but not used variable 'ppmax'
@ 2019-06-14  2:44 YueHaibing
  2019-06-14 13:53 ` Varun Prakash
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2019-06-14  2:44 UTC (permalink / raw)
  To: Martin K . Petersen, Varun Prakash, David S. Miller,
	Mike Christie, Bart Van Assche
  Cc: YueHaibing, linux-scsi, target-devel, kernel-janitors, linux-kernel

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/target/iscsi/cxgbit/cxgbit_ddp.c: In function 'cxgbit_ddp_init':
drivers/target/iscsi/cxgbit/cxgbit_ddp.c:303:15: warning:
 variable 'ppmax' set but not used [-Wunused-but-set-variable]

It's not used since commit a248384e6420 ("cxgb4/libcxgb/cxgb4i/cxgbit:
enable eDRAM page pods for iSCSI")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/target/iscsi/cxgbit/cxgbit_ddp.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/target/iscsi/cxgbit/cxgbit_ddp.c b/drivers/target/iscsi/cxgbit/cxgbit_ddp.c
index 1443ef045a5f..fe1be5feaf21 100644
--- a/drivers/target/iscsi/cxgbit/cxgbit_ddp.c
+++ b/drivers/target/iscsi/cxgbit/cxgbit_ddp.c
@@ -300,7 +300,6 @@ int cxgbit_ddp_init(struct cxgbit_device *cdev)
 	struct cxgb4_lld_info *lldi = &cdev->lldi;
 	struct net_device *ndev = cdev->lldi.ports[0];
 	struct cxgbi_tag_format tformat;
-	unsigned int ppmax;
 	int ret, i;
 
 	if (!lldi->vr->iscsi.size) {
@@ -308,8 +307,6 @@ int cxgbit_ddp_init(struct cxgbit_device *cdev)
 		return -EACCES;
 	}
 
-	ppmax = lldi->vr->iscsi.size >> PPOD_SIZE_SHIFT;
-
 	memset(&tformat, 0, sizeof(struct cxgbi_tag_format));
 	for (i = 0; i < 4; i++)
 		tformat.pgsz_order[i] = (lldi->iscsi_pgsz_order >> (i << 3))

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

* Re: [PATCH -next] cxgbit: remove set but not used variable 'ppmax'
  2019-06-14  2:44 [PATCH -next] cxgbit: remove set but not used variable 'ppmax' YueHaibing
@ 2019-06-14 13:53 ` Varun Prakash
  0 siblings, 0 replies; 2+ messages in thread
From: Varun Prakash @ 2019-06-14 13:53 UTC (permalink / raw)
  To: YueHaibing
  Cc: Martin K . Petersen, David S. Miller, Mike Christie,
	Bart Van Assche, linux-scsi, target-devel, kernel-janitors,
	linux-kernel, varun

On Fri, Jun 14, 2019 at 02:44:13AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/target/iscsi/cxgbit/cxgbit_ddp.c: In function 'cxgbit_ddp_init':
> drivers/target/iscsi/cxgbit/cxgbit_ddp.c:303:15: warning:
>  variable 'ppmax' set but not used [-Wunused-but-set-variable]
> 
> It's not used since commit a248384e6420 ("cxgb4/libcxgb/cxgb4i/cxgbit:
> enable eDRAM page pods for iSCSI")
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/target/iscsi/cxgbit/cxgbit_ddp.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/target/iscsi/cxgbit/cxgbit_ddp.c b/drivers/target/iscsi/cxgbit/cxgbit_ddp.c
> index 1443ef045a5f..fe1be5feaf21 100644
> --- a/drivers/target/iscsi/cxgbit/cxgbit_ddp.c
> +++ b/drivers/target/iscsi/cxgbit/cxgbit_ddp.c
> @@ -300,7 +300,6 @@ int cxgbit_ddp_init(struct cxgbit_device *cdev)
>  	struct cxgb4_lld_info *lldi = &cdev->lldi;
>  	struct net_device *ndev = cdev->lldi.ports[0];
>  	struct cxgbi_tag_format tformat;
> -	unsigned int ppmax;
>  	int ret, i;
>  
>  	if (!lldi->vr->iscsi.size) {
> @@ -308,8 +307,6 @@ int cxgbit_ddp_init(struct cxgbit_device *cdev)
>  		return -EACCES;
>  	}
>  
> -	ppmax = lldi->vr->iscsi.size >> PPOD_SIZE_SHIFT;
> -
>  	memset(&tformat, 0, sizeof(struct cxgbi_tag_format));
>  	for (i = 0; i < 4; i++)
>  		tformat.pgsz_order[i] = (lldi->iscsi_pgsz_order >> (i << 3))
> 

Acked-by: Varun Prakash <varun@chelsio.com>

This patch is for net-next tree.

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

end of thread, other threads:[~2019-06-14 13:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-14  2:44 [PATCH -next] cxgbit: remove set but not used variable 'ppmax' YueHaibing
2019-06-14 13:53 ` Varun Prakash

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).